Getting Started

Note:
This help file is a beta version and is incomplete. If missing links and errors keep you from getting the information you need, ask the [image] Message Board.

  • If you're new to IRC, read the Quick Start Guide. It explains how IRC works, how to get online, and how to chat once you're there.
  • Otherwise, skip ahead to the Configuration section for a look at ViRC's options and initial setup.

Proceed to Quick Start Guide
Next section: Configuration


Welcome to ViRC

Please choose a topic from the list on the left.


Quick Start Guide

What is IRC?

Internet Relay Chat (IRC) is a worldwide collection of chat servers. Each server has different features, rules, and users, but one thing they have in common is the IRC protocol. The IRC protocol is a standard language spoken by all IRC servers, which means that an IRC client (such as ViRC) can connect to any server.

Most large IRC servers are run by universities or businesses. The people in charge of running the server are called IRC operators (IRCops).

See also: Finding A Server

Networks

Most servers are linked into networks. If you're connected to a server that's on a network, you'll be able to talk to anybody who is using any server from that network; if your server is not on a network, you'll only be able to talk to people who are using the same server.

Nicknames

Everyone on IRC is identified by a unique nickname (a nick). The various networks have different limits on nicks, but generally they can be up to 9 characters long and must not start with digits or contain any spaces. (Some networks allow nicks as long as 30 characters.)

Nicknames are case-insensitive: MeGALiTH, megalith, and MegaLith are all the same person.

Some networks allow you to register a nickname to prevent others from using it, but usually it's first come, first served. You cannot choose a nickname that's being used by someone who came before you; you have to wait for him to change his nick or go offline.

Channels

An individual "chat room" on IRC is called a channel. Channels are named with # and a word, like #Seattle, #math, or #ViRC. Each channel has options that can be set, including a key, limit, topic, and modes.

ViRC opens a new window for each channel you join. The channel window has an output pane where you see what's being said in the channel, an input line where you type what you want to say, and a nick list showing the users in the channel. Some nicks in the list may be prefixed with special characters: channel operators have @, users with voice have +, and on some networks helpers (or half-ops) have %.

The people who run the channel are called channel operators (or ops). Channel operators can modify the channel by performing mode changes, which can affect the key (password required to join) or limit (number of users allowed in the channel), among other options. Mode changes can also make the channel moderated, which means that only channel operators and users with voice can talk.

Channel operators can grant operator priviliges and voice to other users. They're also able to kick people out of the channel and ban them from coming back. Try to stay on their good side :)

You can create your own channels simply by thinking of a new channel name and joining it. If the channel does not exist, it will be created and you will become its first channel operator. The channel will be deleted when it becomes empty; on some networks you can register your channel to prevent this.

See also: Finding Channels, Chatting Quick Reference, Channel Operator Quick Reference

Private Messages

IRC can also be used as an "instant messenger," letting you send messages privately to individuals. You can open a query window if you'll be having a long conversation; all the text send back and forth between you and the query target will be shown there. Without a query window open, messages you send or receive will be displayed in the current window:

*MeGALiTH* Hi there! Type '/msg megalith like this?' to send me a private message.
-> *megalith* like this?
*MeGALiTH* Exactly!

You may also see notices, which are like private messages but are usually sent automatically by the server or used as announcements:

=irc.somenetwork.com= Looking up your hostname...
=MeGALiTH:#virc= Everyone in #virc sees this.
=SomeIRCop= The server will be going down for maintenance shortly.

You can privately send a notice to the channel operators with the /wall command.

You can use ViRC's notify list like a "buddy list." Anyone on your notify list who is online will appear in the list in your server window, and you will receive messages when they sign on and off.

See also: Chatting Quick Reference

Proceed to Finding A Server
Back to Getting Started


Finding A Server

(((TO BE WRITTEN)))

Server Lists

You can find server lists at [image] R0aD]{ilL's ViRC 2 page.

Proceed to Connecting
Back to Quick Start Guide


Connecting

Proceed to Finding Channels
Back to Finding A Server


Finding Channels

Proceed to Chatting Quick Reference
Back to Connecting


Quick Reference - Chatting

Chatting

  • Standard (user) IRC commands
  • Channel operator commands
  • IRC operator commands
  • DCC commands (chat and file transfer)
  • More commands

Proceed to Standard IRC commands
Back to Finding Channels


Standard IRC commands

This section details the standard set of IRC commands, which appear in virtually every IRC client. More advanced commands, especially those pertaining only to ViRC, are detailed in the following sections.

See also: IRC Commands List

Note: Required parameters are given like this. Optional parameters are given like [this], but don't type the []'s! Also, some commands have an optional [channel] parameter; if you omit it, the command will apply to the channel where you typed it.

JOIN command

Usage: /join channel [password]

Joins channel, creating a new channel window. If channel doesn't already exist, it will be created for you, and you will be made operator. Some channels require a password to join.

channel can also be a list of channels separated by commas. If you join more than one channel with a single command, and one or more requires a password, password should be a corresponding list separated by commas.

Proceed to Channel operator commands
Back to Chatting Quick Reference


Channel Operator Commands

Proceed to IRC operator commands
Back to Standard IRC commands


IRC Operator Commands

Proceed to DCC commands
Back to Channel operator commands


DCC Commands

Proceed to More commands
Back to IRC operator commands


More Commands

Proceed to Channel Operators Quick Reference
Back to DCC commands


Quick Reference - Channel Operators

Channel Operator Commands

Back to More commands
Next section: Command line parameters


Command Line Parameters

  • -nosplash
    Hides the splash screen which appears before the ViRC window.
  • -user profile_name
    Loads a different user profile. To create a new profile, supply the name of a profile that does not yet exist.
  • -uninstall
    Starts ViRC's uninstaller to delete your saved settings.
  • -loadscript filename.vsc
    Loads a script file immediately after startup.
  • -editscript filename.vsc
    Opens a script file in the script editor. ViRC wille exit when the script editor is closed.
  • -importservers filename.vsl
    Imports servers from a server list file, then exits when the import process is finished.
  • -chat filename.chat
    Connects to the server and channel stored in a chat file.
  • -editchat filename.chat
    Opens a chat file in ViRC's chat file editor, then exits when the editor is closed.

Back to Channel operators quick reference
Next section: Configuration


Configuration

You can access ViRC's configuration window by choosing "Configuration..." from the File menu, or by typing /showclientsetup at the input line. The window is divided into several sections, but some controls are available on every page:

Save to INI file
If checked, the configuration will be saved to a file on disk instead of the system registry. The file will be called ViRC.ini if you're using the default user profile, or ViRC-profile.ini if you're using a separate profile.
OK button
Click this to save your changes and close the configuration window.
Cancel button
Click this to close the configuration window without saving any changes.

Sections:

  • Initial setup
  • Text windows
  • Default messages & reconnect
  • Logging
  • SOCKS & DCC
  • Scripts & update checking
  • Script settings
  • Event sounds
  • Paths

Proceed to Initial Setup
Previous section: Getting Started
Next section: ViRC Windows


Configuration - Initial Setup

Initial Setup

Click on a part of the image to see a description, or scroll down to see a list:

Default nicks
ViRC will try to use these nicknames in order. If the first nickname is unavailable, ViRC will try the second, and so on. You must have at least one default nickname.
Add and Remove buttons
Adds a nickname to the list, or removes the selected nickname.
Up and down arrow buttons
Moves the selected nickname up or down in the list. Nicks at the top will be tried first.
Ident
A word to identify you to the server and distinguish you from others using the same Internet provider. All other users on IRC will see this before your hostname. You may want to use the first part of your email address (before the @).
Answer for all programs
If checked, ViRC's ident server will remain active all the time, and will answer with your default ident for any requests it doesn't understand. Otherwise, ViRC's ident server is only active when connecting to IRC, and it will return an error for requests it doesn't understand.
Real name
Something to identify you on IRC. Anyone can use /whois to retrieve this information. It doesn't have to be your real name; it could be your email address, home page, or a favorite quote.
Default server
When you create a new server window, it will initially be set to connect to the server you specify here. Click the "..." button to select a server from the server list.
Wallpaper
The name of a file to show in ViRC's "desktop" area, behind all the server and channel windows.
Minimize to tray
If checked, minimizing ViRC will cause it to appear in the system tray instead of the taskbar.
Always in tray
If checked, ViRC's icon will always appear in the system tray, even when the window is visible.
Double click to restore
If checked, a single click on the tray icon has no effect, and double-clicking it will restore ViRC. Otherwise, a single click will restore ViRC.
Hide server pings
Suppresses the display of "pings," which the server sends to make sure the client is still running. ViRC will still respond to pings if they are hidden.
Auto rejoin when kicked
If checked, ViRC will immediately try to rejoin a channel when you are kicked out.
New windows appear maximized
If checked, all new child windows will take up the entire ViRC client area. They will either be maximized or inflated, depending on the value of...
Maximize button inflates
If checked, clicking a window's maximize button will cause it to "inflate," meaning it takes up the entire ViRC client area but is not actually maximized. This speeds up switching between windows on slower computers. If both "Maximize button inflates" and "New windows appear maximized" are checked, new windows will appear inflated.
Keep channels open when dropped
If checked, channel windows will stay open when the server disconnects you, and when you reconnect, ViRC will try to rejoin them. They will not stay open if you close the connection yourself.
No separators on window tab bar
Hides the lines separating buttons on ViRC's "taskbar."
Hide window tab bar
If checked, the tab bar will not be shown. You can still switch between windows by pressing Ctrl+Tab or using the Window menu.
Mouse wheel fix
If you have a wheel mouse but turning the wheel doesn't cause ViRC's windows to scroll, try checking or unchecking this option.
Show color palette
Causes a color palette to appear when you start entering a color code with Ctrl+K. The palette will stay visible until you are finished with the color code.

Proceed to Text Windows
Back to Configuration


Configuration - Text Windows

Text Windows

Click on a part of the image to see a description, or scroll down to see a list:

Event colors
Double-click an item in the list to change the color. Each color is named after an event or color area; for example, ecBackground changes the background color of text windows (unless a background image is used) and ecMyQueryText controls the color of text you enter in a query window.
Main font
Click to change the font used to display text in server, channel, query, and DCC chat windows. The output pane and input line use the same font. Bold, italic, underline, and strikeout attributes cannot be used for the main font.
Nick list font
Click to change the font used to dsplay nicks in the server notify list and the channel nick list.
Max lines
The number of lines of text to be stored in each output pane's scrollback buffer. You can see a window's scrollback buffer by moving its scroll bar or pressing Page Up, and a lock icon will appear while viewing scrollback.
Copy attributes to clipboard
For every application
Color codes will be copied as part of the text, so they will appear when you paste into any application.
Only for ViRC
Text you copy will be stored in two formats on the clipboard: plain text for pasting into other applications, and a special format for pasting into ViRC. Color codes will appear when you paste from one ViRC window to another, but not when you paste into another application.
Never
Color codes will be stripped from all text that you copy.
Replace tabs with spaces
If checked, tab characters will appear as a fixed space instead of attempting to line text up at tab positions.
Disable bitmaps
Suppresses the small images that appear before some events.
Old italics compatibility mode
Older versions of ViRC interpreted ^V as italic instead of inverse; this option causes ViRC to return to the older behavior. It also affects the characters inserted by Ctrl+R (inverse) and Ctrl+N (italic).
Color merge mode
No highlight
Hyperlinks controlled by the script (such as active nicks and active hostnames) will appear with no highlight; that is, the same color as the surrounding text.
Averaged
Script links will appear halfway between ecScriptLink and the color of the surrounding text.
Full highlight
Script links will appear in the color ecScriptLink.
Background image
A file to display behind the text. If background images are disabled, the background will be a solid fill of the color ecBackground instead.
Continuous backgrounds
If checked, all background images will be tiled from the same point:
Otherwise, each window's background will be tiled from the corner of that window:
Show timestamps
If checked, timestamps will be displayed in all output windows.
Timestamp format
A string of time format specifiers used to display the timestamps. For example, [hh:nn] will display 24-hour time surrounded by square brackets.

Proceed to Default Messages & Reconnect
Back to Initial Setup


Configuration - Default messages & reconnect

Default Messages & Reconnect

Click on a part of the image to see a description, or scroll down to see a list:

The X message
Used as your quit message when you disconnect by closing ViRC's main window or a server window. May contain attribute codes and function calls.
Quit message
Used as your quit message when you disconnect with /quit or /exit. May contain attribute codes and function calls.
Kick message
Used as the reason when you kick someone from a channel without specifying a reason. May contain attribute codes and function calls.
Kickban message
Used as the reason when you kickban someone from a channel without specifying a reason. May contain attribute codes and function calls.
Automatically reconnect when dropped
If checked, ViRC will attempt to reconnect when you are disconnected by the server.
Wait X seconds between attempts
After a failed attempt, ViRC will wait this long before trying to reconnect again.
Give up after X attempts
ViRC will stop trying to reconnect if it fails after this many attempts.
After X attempts, increase delay to Y seconds
If this many attempts fail, ViRC will begin waiting this long between attempts, instead of the value given above for "Wait X seconds between attempts."
After X attempts, try another server from the same network
If this many attempts fail, ViRC will try to reconnect to another server from the same network, unless the server being attempted is marked Don't hop away in the server list. If Random is chosen, another server will be picked randomly; if Sequential is chosen, the next server in the list will be tried.

Proceed to Logging
Back to Text Windows


Configuration - Logging

Logging

Click on a part of the image to see a description, or scroll down to see a list:

Automatically open logs for
The window types that ViRC will automatically begin logging when a new window of that type is opened.
Log filenames
Template filenames used to open the log files. Use variables to fill in the name of the window being logged; for example, if the channel log is set to $C.log, the log for #virc will be called #virc.log. The variables are $server for server windows, $C for channel windows, and $nick for query and DCC chat windows. These messages may also contain function calls.
Strip attributes from logs
If checked, ViRC will remove attribute and color codes from the log files.
Timestamp logs with format
If checked, each line in the log will be prefixed with a timestamp. The format string can contain attribute codes and function calls; for example, [$time(hh:nn)] will produce 24-hour time surrounded by square brackets.

Proceed to SOCKS & DCC
Back to Default Messages & Reconnect


Configuration - SOCKS & DCC

SOCKS & DCC

Click on a part of the image to see a description, or scroll down to see a list:

Use SOCKS4
If checked, ViRC will use a SOCKS 4 proxy server to connect to IRC. You will not be able to send files with DCC unless Use reverse DCC sends is enabled.
Host
The hostname of your SOCKS 4 proxy.
Port
The port on which the SOCKS 4 proxy accepts connections.
Spaces in outgoing file names
Leave as spaces
Filenames with spaces will be sent surrounded by quotes. Some clients may not understand requests with spaces in the filename.
Change to underlines
The spaces in filenames will be changed to underlines (_). All clients will be able to receive these requests.
Spaces for TDCC, underlines for DCC
Names of files being sent with TDCC will stay the same, but spaces in filenames being sent with DCC will be changed to underlines. Since the clients that support TDCC also support spaces in filenames, this is usually the best choice.
Automatically show DCC list for
Controls when the DCC list will be shown. All incoming requests tells ViRC to show the list whenever you receive a DCC request; All outgoing requests causes the list to be shown whenever you send a request to someone else.
Use reverse DCC sends
Enables "firewall DCC" mode, which allows you to send files from behind a firewall. With regular DCC, the sender waits for an incoming connection from the receiver; with reverse DCC, the sender tells the receiver to wait for a connection instead. If both users are behind firewalls (neither can receive incoming connections) DCC will not work.
Use DCC send-ahead
If checked, ViRC will send data without waiting for an acknowledgement from the receiver, improving DCC performance. TDCC connections always use send-ahead.
Use old TDCC handshake
If checked, ViRC will use the old TDCC handshake method (DCC TSEND) instead of the new one (DCC SEND ... T). The old method is compatible with old versions of ViRC; the new method is compatible with other clients that support TDCC. The new method may also work with some other clients that don't claim to support TDCC. Changing this option is not recommended.
DCC block size
The amount of data to send at one time. With send-ahead disabled, a larger block size will improve performance; with send-ahead enabled or with TDCC connections, the block size is less important.
Force DCC IP address
If checked, ViRC will use the address you specify instead of your local IP address when asking receivers to connect for a transfer. This is useful when you're using NAT or a router, so your local IP address is unreachable from outside: forward the appropriate ports from the router to your local machine, then enable this option and type in the router's IP address.
Force port range
If checked, ViRC will only listen on ports in this range for DCC transfers. If you are forwarding ports from a router, you will probably want to use this option so you only have to forward a certain range of ports.

Proceed to Scripts & Update Checking
Back to Logging


Configuration - Scripts & Update Checking

Scripts & Update Checking

Click on a part of the image to see a description, or scroll down to see a list:

Master script
This script will be loaded before any others. The master script is responsible for handling many standard IRC events, and if it can't be loaded, ViRC will not start. The default master script is ViRC.lib. You should not change this option unless you have another script that handles all the events contained in ViRC.lib.
Add-on scripts
Scripts listed here will be loaded after the master script, in the order they appear in the list. Since most scripts don't replace the master script, almost all scripts you download will go here.
Add and Remove buttons
Adds a filename to the add-on script list, or removes the selected filename.
Up and down arrow buttons
Moves the selected add-on script up or down in the list. Scripts at the top will be loaded first.
Personal script
This script will be loaded after the master script and all add-ons, and it will be created automatically if it doesn't exist. The personal script also appears when you first open the script editor.
Enable automatic update checking
If checked, ViRC will automatically check for updates a few minutes after you start the client. When automatic checking is disabled, you can still check for updates by selecting "Check for updates" from the File menu, or by typing /CheckForUpdates.
Send anonymous system information
If checked, ViRC will send some information about your computer when it checks for updates. The information does not identify you personally and is only used so that ViRC can be made to run better on systems like yours. The actual pieces of data collected are: operating system, CPU model and speed, total RAM installed, screen size, main font, nick list font, background color, and channel text color.
Send anonymous IRC-related information
If checked, ViRC will send some information about your IRC use when it checks for updates. The information does not identify you personally and is only used for statistics. The actual pieces of data collected are: connected servers, time connected, number of open channels/queries/DCC chats/whiteboards, and installed scripts.
Show server notes
If checked, miscellaneous notes from the server will be shown in the update window.

Proceed to Script Settings
Back to SOCKS & DCC


Configuration - Script Settings

Script Settings

The Script settings section is controlled by the script, so depending on which scripts you have installed, you may see more or fewer options. This page describes the options used by the default script (ViRC.lib).

Click on a part of the image to see a description, or scroll down to see a list:

Default user mode
The user mode to set when you join a server. This option can be overridden by the server list. The default, +i, causes you to be invisible to anyone who does not know your nick and is not on any channels with you.
Auto join channels
A list of channels to join when connecting to the server. This option can be overridden by the server list. To join more than one channel, separate them by commas: #virc,#math,#cnn. To join channels with keys, give a list of channels, a space, and a corresponding list of keys: #secret1,#virc,#secret2,#math key1,,key2,
Userinfo response
Text to return in response to a CTCP USERINFO request. This option can be overridden by the server list.
Auto connect to servers
A list of servers to automatically connect to when starting ViRC. To connect to more than one server, separate them by spaces: irc.dal.net us.undernet.org.
Hide server on autojoin
If checked, the server window will be hidden once ViRC has autojoined channels.
Show query window for incoming msgs
If checked, a query window will automatically be created when someone sends you a private message. Otherwise, private messages will appear in the current window unless you create a query explicitly.
Show unrecognized server numerics
If checked, you will see the entire content of any unrecognized lines in the server window. Otherwise, ViRC will strip the first few fields to make the lines more presentable.
Active nicks
If checked, nicknames will become script links. You will be able to right-click a highlighted nickname in the output pane to see a popup menu of actions.
Active hosts
If checked, hostnames will become script links. You will be able to double-click a highlighted hostname to perform a DNS lookup.
Active modes
If checked, mode changes will become script links. You will be able to right-click a highlighted mode change to undo it.
Active invites
If checked, invitations will become script links. You will be able to double-click a highlighted invitation to join the inviting channel.
Auto-accept DCC chat
If checked, ViRC will automatically accept any incoming DCC chat requests.
Auto-accept DCC send
If checked, ViRC will automatically accept any incoming DCC or TDCC file transfers. Be careful. If Auto-resume DCC is checked, ViRC will resume existing files instead of choosing new names, when appropriate.
Dangerous file extensions
A list of extensions that may contain dangerous content. If Auto-accept DCC send is checked, dangerous files will be added to the DCC list instead of being automatically accepted; otherwise, a message box will appear before the file is added to the DCC list giving you the option to reject the transfer. The default (exe,lib,vsc,vbs,js,bat) includes programs, scripts, and batch files. Some networks have a "DCC allow" feature that blocks dangerous file types at the server level; the way to change or disable that feature depends on the network.

Proceed to Event Sounds
Back to Scripts & Update Checking


Configuration - Event Sounds

Event Sounds

Click on a part of the image to see a description, or scroll down to see a list:

Event list box
Lists all the sound events made available by your currently loaded scripts. Events are organized into categories, which you can show and hide by clicking the plus or minus button. Events with valid sound files set are shown with dark icons; events with no filename, or with filenames that don't exist, are shown with light icons.
Sound file drop box
Lists the sound files available in your sound path. You can select a file from the list or type in a path.
Play button
Plays the selected file.
Browse (...) button
Opens a window to browse for sound files.
Enable sounds
Controls whether event sounds will be played. If unchecked, the PlayEventSound and PlaySoundFile commands will be disabled.

Proceed to Paths
Back to Script Settings


Configuration - Paths

Paths

Click on a part of the image to see a description, or scroll down to see a list:

Browse (...) buttons
Each button opens a dialog box to browse for the corresponding path setting.
Download path
The default directory for files you receive with DCC.
Upload path
The default directory for files you send with DCC.
Sound path
The default directory for sound filenames used with event sounds and the PlaySoundFile command.
Image path
The default directory for image filenames used with wallpaper, background images, and the TextOutBitmap command.
Log path
The default directory for log files.
Script path
The default directory for scripts and the Load command.

Back to Event Sounds
Next section: ViRC Windows


ViRC Windows

  • Main window
    • Server windows
    • Channel windows
    • Query windows
    • DCC chat windows
    • Whiteboard windows
  • Configuration window
  • Notify setup
  • Script editor
    • Header/footer
    • Aliases
    • Events
    • Menu trees
    • Menu items
  • Server list
  • DCC list
  • Channel control window
  • Channel list window (/list)
  • User list window (/who)

Proceed to Main Window
Previous section: Configuration
Next section: Scripting


Main Window

Click on a part of the image to see a description, or scroll down to see a list:

New server window button
Opens a new server window, ready to connect to your default server.
Configuration button
Opens the configuration window.
Server list button
Opens the server list.
Script editor button
Opens the script editor.
Reload scripts button
Unloads all scripts, then reloads the scripts listed on the scripts configuration page.
Tile button
Arranges all visible child windows in a rectangular grid.
Cascade button
Arranges all visible child windows in an overlapping format.
Inflate button
Inflates all child windows, making them take up the entire client area.
Exit button
Disconnects from all servers and closes ViRC.
"Desktop"
This is where the wallpaper appears. All child windows are confined to the desktop.
Child windows
Server, channel, query, DCC chat, and whiteboard windows are called child windows because they are confined to the main ViRC window (the parent window). Clicking a child window's minimize button hides the window. You can switch between child windows by pressing Ctrl+Tab, using the Window menu, or clicking buttons on the Window tab bar.
Inactive tab
Inactive tabs appear flat and in the regular taskbar color; they represent child windows that you are not currently using. Inactive tabs change to a highlighted color when new text appears in the child windows.
Active tab
Active tabs appear indented. Only one tab is active at once, and it represents the child window that you are currently using.
Hidden tab
Hidden tabs appear in a disabled color. Hidden tabs represent child windows that are have been hidden, and they change to a highlighted color when new text appears.
Window tab bar
The tab bar has buttons for each open child window. Tabs for channel and query windows are grouped with the tab for the server that owns them. Single-clicking a button activates the window, double-clicking it hides the window, and clicking with the right button shows a popup menu.
Status bar
The status bar shows informative messages such as non-fatal errors and menu item hints.

Proceed to Server Windows
Back to ViRC Windows


Server Windows

Click on a part of the image to see a description, or scroll down to see a list:

Connect button
Connects to the server shown in the Current server edit box.
Disconnect button
Disconnects from the server.
Server links button
Requests a list of servers linked to the current network.
Channel list button
Prompts for a pattern to search for, then opens the channel list with a list of matching channels. For example, to search for channels about ViRC, try the pattern *virc*. For all channels, use *.
Timestamp on/off button
Shows or hides timestamps in the output pane.
Log on/off button
Enables or disables logging. When logging is enabled, all text sent to the output pane will also be stored in a file. The filename can be configured on the logging configuration page.
Current server edit box
When the connection is active, this shows the server's name. When there is no server connection active, this shows the server that will be used by the Connect button. You can use the form irc.host.com, irc.host.com:port, irc.host.com%password, or irc.host.com:port%password. (Most servers do not require passwords.)
Select server button
Opens the server list so you can choose a server. The selected server's name will be placed in the Current server edit box.
Output pane
Displays notices from the server, as well as any private messages or other general events that occur while the server window is active. You can right-click the output pane for a popup menu.
Notify list box
Shows the nicknames of everyone on your notify list who is currently online. You can right-click the list box for a popup menu.
Input line
You can type commands here. The / before a command is optional in the server window. You can scroll through your command history with the up and down arrow keys.

Proceed to Channel Windows
Back to Main Window


Channel Windows

Click on a part of the image to see a description, or scroll down to see a list:

Part button
Leaves the channel.
Cycle button
Leaves the channel and immediately tries to rejoin. This can be useful if everyone else has left the channel but you aren't a channel operator.
Channel info button
Opens the channel control window, where you can see the channel's topic, modes, and bans (and edit them if you're a channel operator).
Timestamp on/off button
Shows or hides timestamps in the output pane.
Log on/off button
Enables or disables logging. When logging is enabled, all text sent to the output pane will also be stored in a file. The filename can be configured on the logging configuration page.
Mode
Channel options are controlled by the mode. Each letter in the mode stands for an option:
  • i - invite only
  • k - key is set (the key appears after the mode)
  • l - limit is set (the limit appears after the mode)
  • m - moderated
  • n - no messages from outside the channel
  • t - only ops can set the topic
  • p - private (obsolete, use secret instead)
  • s - secret, doesn't show up in /list or /whois unless you're on the channel
Some servers and networks may have different modes available.
Topic
A short piece of text associated with the channel. Usually it describes the purpose of the channel, the conversation, or the channel's homepage. The topic shows up in channel lists and appears when you join the channel.
Output pane
Displays chat and events from the channel, as well as private messages and other general events that occur while the channel window is active. You can right-click the output pane for a popup menu, or double-click to open the channel control window.
Nick list box
Shows the nicknames of everyone in the channel. Channel operators have a @ before their nicks, users with voice have +, and half-ops have % (on some networks). You can right-click the nick list for a popup menu, or double-click a nick to see user information.
Input line
Type a line of text here to send it to the channel. You can use /me to perform an "action" in the channel; for example, /me waves to everybody. You can also use any other command here by prefixing it with a /. The up and down arrow keys scroll through your command history.

Proceed to Query Windows
Back to Server Windows


Query Windows

Click on a part of the image to see a description, or scroll down to see a list:

Timestamp on/off button
Shows or hides timestamps in the output pane.
Log on/off button
Enables or disables logging. When logging is enabled, all text sent to the output pane will also be stored in a file. The filename can be configured on the logging configuration page.
Output pane
Displays your conversation, as well as other general events that occur while the query window is active. You can right-click the output pane for a popup menu, or double-click to get /whois information about the query target.
Input line
Type a line of text here to send it as a private message. You can use /me to perform an "action"; for example, /me grins (this is equivalent to /desc target_nick grins). You can also use any other command here by prefixing it with a /. The up and down arrow keys scroll through your command history.

Proceed to DCC Chat Windows
Back to Channel Windows


DCC Chat Windows

Click on a part of the image to see a description, or scroll down to see a list:

Timestamp on/off button
Shows or hides timestamps in the output pane.
Log on/off button
Enables or disables logging. When logging is enabled, all text sent to the output pane will also be stored in a file. The filename can be configured on the logging configuration page.
Output pane
Displays your conversation, as well as other general events that occur while the query window is active. You can right-click the output pane for a popup menu.
Input line
Type a line of text here to send it over the DCC chat connection. You can use /me to perform an "action"; for example, /me grins (this is equivalent to /desc =target_nick grins). You can also use any other command here by prefixing it with a /. The up and down arrow keys scroll through your command history.

Proceed to Whiteboard Windows
Back to Query Windows


Whiteboard

Whiteboard Windows

Click on a part of the image to see a description, or scroll down to see a list:

Drawing area
This is where you and the remote user draw. Dragging the mouse while holding the left button uses the selected tool with the primary color; dragging with the right button uses it with the secondary color.
Dropdown menu
Copy
Copies the image in the drawing area to the clipboard.
Save as bitmap
Saves the image to a BMP file.
Record drawing
Begins recording all drawing activity to a file, in order to play it back later.
Play back drawing
Plays back a recorded drawing session from a file.
Clear button
Erases the drawing area.
Pencil tool
Freehand drawing. Lays down the selected color wherever you move the mouse.
Line tool
Draws a straight line from one point to another. Hold down Shift to constrain the line to 45-degree increments.
Outlined rectangle tool
Draws the outline of a rectangle. Hold down Shift to draw a square instead.
Filled rectangle tool
Draws the outline of a rectangle in the selected color, and fills it with the other color. Hold down Shift to draw a square instead.
Outlined ellipse tool
Draws the outline of an ellipse. Hold down Shift to draw a circle instead.
Filled ellipse tool
Draws the outline of an ellipse in the selected color, and fills it with the other color. Hold down Shift to draw a circle instead.
Text tool
Draws text. Click where you want the text to appear, type the text, and then press Enter. Double-click on the text tool to change the font.
Eraser tool
Erases with a wide brush. The eraser is controlled just like the pencil.
Fill tool
Fills an area with the selected color. The area is defined by the point you click in the drawing area and all connected pixels of the same color.
Arrow tool
Draws an arrow from one point to another. The arrow is controlled just like the line.
Primary color button
Click to select a new primary color. The current primary color is displayed to the right of the button.
Secondary color button
Click to select a new secondary color. The current secondary color is displayed to the right of the button.
Pen width button
Click to change the pen width, which is used for the pencil, line, arrow, and shape outlines. An example of the current pen width is shown next to the button.

Proceed to Notify Setup
Back to DCC Chat Windows


Scripting

  • Script editor
  • Aliases
  • Events
  • Menus
  • Toolbars
  • Using objects
  • Defining new classes
  • Statements by name
  • Commands and functions by category
  • Commands by name
  • Functions by name
  • Classes by name

Previous section: ViRC Windows
Next section: UNKNOWN


Commands By Name

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

-
Back to top

  • -@
  • -@L
  • -@S

@
Back to top

  • @
  • @E
  • @E+
  • @E-
  • @L
  • @P
  • @S

A
Back to top

  • AAMe
  • AASay
  • AbortEvents
  • AddEventSound
  • AddScriptControl
  • AddToIAL
  • AddToSetProp
  • AMe
  • AppendText
  • ASay
  • Away

B
Back to top

  • Ban
  • Beep

C
Back to top

  • CacheBitmap
  • Chain
  • ChannelControl
  • ChDir
  • CheckForUpdates
  • Clear
  • Close
  • Connect
  • CreateFile
  • CTCP
  • Cycle

D
Back to top

  • DCC
  • DDE
  • DelEventSound
  • DelUserField
  • Desc
  • Destroy
  • Disconnect
  • DLL
  • DNS
  • DockToolbar

E
Back to top

  • Eval
  • Exec
  • Exit

F
Back to top

  • FireEvent
  • FireMenuItem
  • FloatToolbar
  • FlushBitmapCache
  • FlushIAL
  • FreeDLL
  • FreeMem

H
Back to top

  • Hide
  • HideToolbar

I
Back to top

  • Inflate
  • Inherited
  • InternalCall
  • IRCHyperlink

J
Back to top

  • Join

K
Back to top

  • KB
  • Kick
  • Kill

L
Back to top

  • List
  • Load
  • Log

M
Back to top

  • Max
  • MCI
  • Me
  • MenuHint
  • MergeMenu
  • MessageBox
  • MessageDlg
  • Min
  • MkDir
  • Mode
  • Msg
  • MTimer

N
Back to top

  • Name
  • Names
  • NewServerWindow
  • NoAttribs
  • Notice
  • Notify

O
Back to top

  • OnAll
  • OnServer

P
Back to top

  • Part
  • Ping
  • PlayEventSound
  • PlaySoundFile
  • PokeByte
  • PokeLong
  • PokeString
  • PokeWord

Q
Back to top

  • Query
  • Quit
  • Quote

R
Back to top

  • RCTCP
  • Rehash
  • RemoveFromIAL
  • RemoveFromSetProp
  • Restore
  • RmDir
  • RmFile

S
Back to top

  • SafeDestroy
  • SaveConfig
  • Say
  • SendMessage
  • Server
  • SetClipboard
  • SetEventLine
  • SetEventSoundFile
  • SetInputLine
  • SetNetData
  • SetServData
  • SetSetting
  • SetToolbar
  • SetUserField
  • SetWindowText
  • Show
  • ShowClientSetup
  • ShowDCCList
  • ShowNotifySetup
  • ShowScriptEditor
  • ShowScriptLog
  • ShowServerList
  • ShowToolbar
  • SimulateServerData

T
Back to top

  • TDCC
  • TextOut
  • TextOutBitmap
  • Timer
  • Timers
  • Topic

U
Back to top

  • UMode
  • UnAlias
  • UnEvent
  • UnHide
  • UnixTime
  • UnTimer
  • UpdateMainMenu
  • UpdateMainToolbar

V
Back to top

  • Ver

W
Back to top

  • WallOps
  • WebHyperlink
  • Whiteboard
  • Who
  • Whois
  • WII
  • WindowedWho

Y
Back to top

  • Yield

See also: Commands and functions by category

Previous section: Commands and functions by category
Next section: Functions by name


Functions By Name

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

A
Back to top

  • ActiveServer
  • ActiveWindow
  • AddToSet
  • AliasExists
  • AliasList
  • ArrayKeys
  • ArrayLength
  • ArrayValues
  • Asc

B
Back to top

  • Bitmap

C
Back to top

  • ChannelList
  • Char
  • ClassOf
  • CTime
  • CurrentServer

D
Back to top

  • Date
  • DCCChatList
  • DCCList
  • DDE
  • DecodeInterval
  • DecodeIP
  • DecodeMInterval
  • DirExists
  • DLL
  • DNS

E
Back to top

  • EncodeIP
  • Eval
  • EventExists
  • EventHandlers
  • EventList
  • EventMask
  • EventSoundList

F
Back to top

  • FileExists
  • FindWindow

G
Back to top

  • GetAddress
  • GetClipboard
  • GetCurrentDir
  • GetDCCInfo
  • GetEventSound
  • GetEventSoundFile
  • GetFileDateTime
  • GetFileSize
  • GetInputLine
  • GetKey
  • GetLimit
  • GetLinesInFile
  • GetMem
  • GetMenuHint
  • GetMode
  • GetNetSetting
  • GetPath
  • GetServSetting
  • GetSetting
  • GetTimer
  • GetTimerServer
  • GetToolbar
  • GetTopic
  • GetUserField
  • GetWindowID
  • GetWindowText
  • GlobMatch
  • GlobMatchCase
  • GlobMatchCaseEx
  • GlobMatchEx

H
Back to top

  • HalfOpList

I
Back to top

  • IdleTime
  • Inherited
  • IsA
  • IsChannel
  • IsDCCChatting
  • IsEventSoundSet
  • IsHalfOp
  • IsInIAL
  • IsInSet
  • IsIP
  • IsLogging
  • IsNumeric
  • IsObject
  • IsOn
  • IsOp
  • IsQuerying
  • IsVoice
  • IsWhiteboarding

L
Back to top

  • Length
  • ListCat
  • ListClean
  • ListDelete
  • ListElementCount
  • ListFromWords
  • ListIndex
  • ListIndexOf
  • ListInsert
  • ListJoin
  • ListQuote
  • ListRand
  • ListRange
  • ListRemove
  • ListReplace
  • ListSearch
  • ListSearchReplace
  • ListShuffle
  • ListSort
  • ListSplit
  • ListUnique
  • LoadDLL
  • LocalNick
  • Lower

M
Back to top

  • MapObject
  • MapProp
  • MapToolbar
  • MaskMatch
  • MD5
  • MessageDlg
  • mIRCColor
  • MTime
  • MTimer

N
Back to top

  • NetworkID
  • New
  • NewServerWindow
  • NewWhiteboard
  • NickList
  • NickToMask
  • NickTrim
  • NoAttribs
  • Notify

O
Back to top

  • OnServer
  • OpenDialog
  • OpenPictureDialog
  • OpList

P
Back to top

  • ParamList
  • ParentClassOf
  • ParseColor
  • PasswordQuery
  • PeekByte
  • PeekLong
  • PeekString
  • PeekWord
  • PeonList
  • Prop
  • PropList

Q
Back to top

  • QueryList

R
Back to top

  • Rand
  • RandomRead
  • ReadLine
  • RemoteNick
  • RemoveFromSet
  • Replace
  • RStrPos
  • RStrPosEx
  • RStrTokL
  • RStrTokLEx
  • RStrTokR
  • RStrTokREx

S
Back to top

  • SameNick
  • SaveDialog
  • SavePictureDialog
  • SelectNetwork
  • SelectServer
  • SendMessage
  • ServerHost
  • ServerID
  • ServerList
  • ShiftKeys
  • StripAttrs
  • StripLinks
  • StrPos
  • StrPosEx
  • StrPosFrom
  • StrPosFromEx
  • StrTokL
  • StrTokLEx
  • StrTokR
  • StrTokREx
  • StrTrim
  • SubStr

T
Back to top

  • Time
  • TimeConnected
  • Timer
  • TimerExists
  • TimerList

U
Back to top

  • UHostToMask
  • UnixTimeOf
  • UnmapObject
  • UpEval
  • Upper
  • UrlDecode
  • UrlEncode
  • UserFieldList

V
Back to top

  • VoiceList

W
Back to top

  • WhiteboardList
  • WildMatch
  • WildMatchCase
  • WildMatchCaseEx
  • WildMatchEx
  • WordCount

See also: Commands and functions by category

Previous section: Commands by name
Next section: Classes by name


-@ command

-@

Category: Variables

Syntax:
-@ $variable
-@ $arrayvar[key]

Deletes the named global variable or array value. Deleting all of an array's values does not delete the array itself.

If the variable or array has been saved with @S, -@ will remove it from memory but the saved copy will not change. Use -@S to remove the saved copy.

Example:
// global variables should be deleted when they are no longer needed
@ $foo = a value
...
-@ $foo

@ $myarray[$somekey] = a value
...
-@ $myarray[$somekey]

See also: -@L, -@S, @

Next in "Variables": -@L
Next by name: -@L
Up to all commands by name or commands and functions by category


-@L command

-@L

Category: Variables

Syntax:
-@L $variable
-@L $arrayvar[key]

Deletes the named local variable or array value. Deleting all of an array's values does not delete the array itself.

Local variables and arrays are automatically deleted when the enclosing routine finishes, so -@L is only necessary when deleting local array elements.

Example:
// in case you don't want the local variable around anymore...
// for example, to access a global variable with the same name
@ $foo = global foo
@l $foo = local foo
// displays "local foo"
MessageBox $foo
-@l $foo
// displays "global foo"
MessageBox $foo

@l $myarray[$somekey] = a value
...
-@l $myarray[$somekey]

See also: -@, -@S, @L

Next in "Variables": -@S
Previous in "Variables": -@
Next by name: -@S
Previous by name: -@
Up to all commands by name or commands and functions by category


-@S command

-@S

Category: Variables

Syntax:
-@S $variable
-@S $arrayvar[key]

Deletes a saved global variable or array value. Deleting all of an array's values does not delete the array itself.

To delete a saved variable from memory without affecting the saved copy, use -@ instead.

Example:
@s $foo = a value to be used later
...
-@s $foo

@s $myarray[$somekey] = another saved value
...
-@s $myarray[$somekey]

See also: -@, -@L, @S

Next in "Variables": @
Previous in "Variables": -@L
Next by name: @
Previous by name: -@L
Up to all commands by name or commands and functions by category


@ command

@

Category: Variables

Syntax:
@ $variable = value
@ ${text} = value
@ $arrayvar[key] = value

Assigns a value to a global variable or array value. Global variables are accessible to all aliases, events, menu items, and other code, unless hidden by a local variable with the same name.

If the variable or array has already been given a saved value with @S, @ will replace the value in memory but the saved copy will be unchanged. If the second syntax is used, text will be evaluated and used as a variable name.

To return a value from an alias, assign to the global variable $fresult.

Example:
@ $ScriptVersion = 1.0
@ $ChannelTopics[$C] = $1-

// alias that can be called as a function
Alias DOUBLE
  @ $fresult = $(2 * $1)
EndAlias
MessageBox Double of 15 is $Double(15)

See also: -@, @L, @S

Next in "Variables": @L
Previous in "Variables": -@S
Next by name: @E
Previous by name: -@S
Up to all commands by name or commands and functions by category


@E command

@E

Category: Objects

Syntax:
@E object.event = command

Sets the specified object's event handler to command. Use this instead of @P when command contains variable or function references that should be evaluated when the event fires, rather than when the event handler is set.

When command contains variable, function, or attribute references, this is equivalent to @p object.event = Eval command, except that command will not be evaluated before setting the property.

Example:
@e $form.OnMouseDown = MessageBox You clicked $Button at $X,$Y

See also: @E+, @E-, @P, EventHandlers

Next in "Objects": @E+
Next by name: @E+
Previous by name: @
Up to all commands by name or commands and functions by category


@E+ command

@E+

Category: Objects

Syntax:
@E+ object.event = id, command

Adds an handler to an object's event. When the event fires, the new handler will run in addition to any others that have been set. id is a unique identifier for this handler; if you call @E+ again with the same identifier, it will replace the previous handler instead of adding it again. (You can use the same id on a different event or object.)

command will be evaluated when the event is fired, not when the handler is set.

Example:
@l $okbtn = $MapObject(!UserSetup:OKBtn)
@e+ $okbtn.OnClick = myscript_setup_ok, MessageBox Thanks for clicking OK.
UnmapObject $okbtn

See also: @E, @E-, EventHandlers

Next in "Objects": @E-
Previous in "Objects": @E
Next by name: @E-
Previous by name: @E
Up to all commands by name or commands and functions by category


@E- command

@E-

Category: Objects

Syntax:
@E- object.event = id

Removes an event handler that was previously added with @E+. id must be the same identifier that was used to add the handler.

Example:
@e+ $form.OnMouseDown = show_position, MessageBox You clicked at $X,$Y
...
@e- $form.OnMouseDown = show_position

See also: @E, @E+, EventHandlers

Next in "Objects": @P
Previous in "Objects": @E+
Next by name: @L
Previous by name: @E+
Up to all commands by name or commands and functions by category


@L command

@L

Category: Variables

Syntax:
@L $variable = value
@L ${text} = value
@L $arrayvar[key] = value

Assigns a value to a local variable or array value. Local variables are only visible in the routine where they were set, and they are deleted automatically when the routine exits. A local variable hides any global variable with the same name.

If the second syntax is used, text will be evaluated and used as a variable name.

Example:
For (@l $i = 1; $i <= 10; $i++)
  MessageBox $i
EndFor

@l $temparray[$key] = value

See also: -@L, @, @S

Next in "Variables": @S
Previous in "Variables": @
Next by name: @P
Previous by name: @E-
Up to all commands by name or commands and functions by category


@P command

@P

Category: Objects

Syntax:
@P object.property = value

Sets the specified object's property to value.

If object belongs to a built-in class, value must be of the appropriate type for the property. Setting a property may cause side effects, depending on the implementation of the class; for example, changing a button's Caption property causes the caption to change on screen. object.property may refer to nested object-type properties: $label.Font.Name

If object belongs to a user-defined class, the effect of @p depends on the property definition and which object is invoking @p:

Write specifier | @p invoked by | Effect
Omitted | Any code | value stored in the object's property data
NoWrite | Any code | Nothing happens
Writer method | The object's own method | value stored in the object's property data
Writer method | Any method of another object, or any other code | Writer method invoked with $0 = property, $1- = value

When setting an event handler property, you should usually use @E instead.

Example:
@p $form.Caption = My Form
@p $button.Font.Style = [fsBold]

// validating property values with a writer method
Class TMyClass
  Public Property Count write SetCount

  Private Method SetCount
    if $IsNumeric($1)
      // this sets the property data directly
      @p $Self.Count = $1
    else
      MessageBox Numbers only please!
    endif
  EndMethod
EndClass

@l $obj = $new(TMyClass)
// this invokes the writer method
@p $obj.Count = 5
// displays the error message box
@p $obj.Count = Dracula
// still displays 5
MessageBox $prop($obj.Count)

See also: @E, Prop

Next in "Objects": AddToSetProp
Previous in "Objects": @E-
Next by name: @S
Previous by name: @L
Up to all commands by name or commands and functions by category


@S command

@S

Category: Variables

Syntax:
@S $variable = value
@S ${text} = value
@S $arrayvar[key] = value

Assigns a value to a global variable or array value, then saves the value in the registry or INI file so it will be available the next time you start ViRC. @S is equivalent to @ except that the value is saved.

Use -@S to remove the saved value.

Example:
@s $ScriptVersion = 1.0
@s $Settings[highlight] = $highlight_enabled

See also: -@S, @, @L

Next in "Variables": ArrayKeys
Previous in "Variables": @L
Next by name: AAMe
Previous by name: @P
Up to all commands by name or commands and functions by category


AAMe command

AAMe

Category: IRC

Syntax:
AAMe text

Sends text as an action to every channel on every server. This is the same as OnAll AMe text.

Example:
AAMe will be back later

See also: AASay, AMe

Next in "IRC": AASay
Next by name: AASay
Previous by name: @S
Up to all commands by name or commands and functions by category


AASay command

AASay

Category: IRC

Syntax:
AASay text

Sends text to every channel on every server. This is the same as OnAll ASay text.

Example:
AASay This message is so important I had to send it to everyone!

See also: AAMe, ASay

Next in "IRC": AddToIAL
Previous in "IRC": AAMe
Next by name: AbortEvents
Previous by name: AAMe
Up to all commands by name or commands and functions by category


AbortEvents command

AbortEvents

Category: Reflection

Syntax:
AbortEvents

Stops event processing of the current line after the current event is finished. If called from a -before event, all priority events and -after events will be skipped. If called from a priority event, all -after events will be skipped.

Example:
// don't process any text at all from people on the ignore list
Event DrasticIgnore -before "*"
  if $IsIgnoring($nick!$user@$host)
    AbortEvents
  endif
EndEvent

See also: FallThrough, SetInputLine

Next in "Reflection": AliasExists
Next by name: ActiveServer
Previous by name: AASay
Up to all commands by name or commands and functions by category


AddEventSound command

AddEventSound

Category: Sounds

Syntax:
AddEventSound name category description [default filename]

Adds a new event sound to ViRC's event sound configuration page. name must be a single word; category, description, and filename (if specified) must be quoted. If a default filename is given, it is assumed to be relative to the sound path.

Example:
Event <OnStart_myscript> "*"
  AddEventSound myscript_page "My Script" "CTCP Page" default page.wav
EndEvent
...
PlayEventSound myscript_page

See also: DelEventSound

Next in "Sounds": Beep
Next by name: AddScriptControl
Previous by name: ActiveWindow
Up to all commands by name or commands and functions by category


AddScriptControl command

AddScriptControl

Category: Configuration

Syntax:
AddScriptControl location edit label name [password] [= default]
AddScriptControl location check label name [transparent] [= default]
AddScriptControl location radio label name option1 [option2 option3...] [= default]
AddScriptControl location button label alias

Adds a new control to one of ViRC's "Script settings" configuration pages, optionally setting a default value. location can be config to add it to the configuration window, server to add it to servers in the server list window, or network to add it to networks in the server list window. name and alias must be a single word; label, default, and option# must be quoted.

You can retrieve the value of an option with GetSetting, GetServSetting, or GetNetSetting, depending on location.

For edit boxes, the password option can be given, which will hide the characters you type into the box.

For check boxes, the transparent option will allow a third state (grayed) in addition to checked and unchecked. The value of the option is 0 for unchecked, 1 for checked, and 2 for grayed.

For radio buttons, option1 and so on are only used for display. The value of the option is 0 if the first is chosen, 1 if the second is chosen, etc.

For regular buttons, alias will be called with $1 set to "display" to retrieve a caption for the label (set $fresult to the appropriate caption), or with $1 set to "click" when the user clicks the button. In either case, $2 will be set to the current network or server name if location is network or server, respectively.

Example:
AddScriptControl network edit "NickServ password" nickserv_passwd password
AddScriptControl config check "Show graphical smileys" smileys_enabled = 1

// use a transparent checkbox to show that a network/server option can override
// a config option
AddScriptControl config check "Respond to CTCP VERSION" ctcp_version_enabled = 1
AddScriptControl server check "Respond to CTCP VERSION" ctcp_version_enabled transparent = 2

AddScriptControl config button "Flood protection settings" floodprot_configbtn
Alias FLOODPROT_CONFIGBTN
  switch $1
    case display:
      if $FloodProtMode == 0
        @ $fresult = disabled
      else if $FloodProtMode == 1
        @ $fresult = enabled (ignore for $FloodProtIgnoreTime minutes)
      else if $FloodProtMode == 2
        @ $fresult = enabled (kickban)
      endif

    case click:
      // show a form to change $FloodProtMode and other options...
      _floodprot_configform
  endswitch
EndAlias

Next in "Configuration": GetPath
Next by name: AddToIAL
Previous by name: AddEventSound
Up to all commands by name or commands and functions by category


AddToIAL command

AddToIAL

Category: IRC

Syntax:
AddToIAL nick user@host

Stores a nick's address in the internal address list (IAL). GetAddress doesn't need to query the server for addresses that are present in the IAL.

Example:
// event to store user@host in IAL when doing a /whois lookup
// leading : makes this run before ViRC.lib's 311 event
Event RPL_WhoisUser_StoreInIAL ":% 311 *"
  AddToIAL $3 $4@$5
EndEvent

See also: IsInIAL, RemoveFromIAL

Next in "IRC": AMe
Previous in "IRC": AASay
Next by name: AddToSet
Previous by name: AddScriptControl
Up to all commands by name or commands and functions by category


AddToSetProp command

AddToSetProp

Category: Objects

Syntax:
AddToSetProp object.property set

Adds elements to an object's set property. This is basically a shortcut for the following code:

@l $value = $prop(object.property) @p object.property = $AddToSet($value set)
Example:
AddToSetProp $form.BorderIcons [biMinimize,biMaximize]

Next in "Objects": Chain
Previous in "Objects": @P
Next by name: AliasExists
Previous by name: AddToSet
Up to all commands by name or commands and functions by category


AMe command

AMe

Category: IRC

Syntax:
AMe text

Sends text as an action to every channel on the current server, the same as running /me channel text for each channel.

Example:
// tell everyone where you're going when you switch servers
Alias SERVER
  AMe is going over to $1-... catch you there!
  *Server $1-
EndAlias

See also: AAMe, ASay

Next in "IRC": ASay
Previous in "IRC": AddToIAL
Next by name: AppendText
Previous by name: AliasList
Up to all commands by name or commands and functions by category


AppendText command

AppendText

Category: Files

Syntax:
AppendText filename text

Adds text as a new line at the end of filename. If the file does not exist, it will be created. filename should be quoted as a list item.

Example:
AppendText $ListQuote($GetPath()privmsgs.log) Private message from $nick: $msg

Next in "Files": ChDir
Next by name: ArrayKeys
Previous by name: AMe
Up to all commands by name or commands and functions by category


ASay command

ASay

Category: IRC

Syntax:
ASay text

Sends text to every channel on the current server, the same as running /say channel text for each channel.

Example:
ASay bbl, going to the store.

See also: AASay, AMe

Next in "IRC": Away
Previous in "IRC": AMe
Next by name: Asc
Previous by name: ArrayValues
Up to all commands by name or commands and functions by category


Away command

Away

Category: IRC

Syntax:
Away [reason]

Marks you as away if reason is given, or removes your away status if it is omitted.

When you are away, your away message will be sent to anyone who sends you a private message, and it will also appear in your /whois listing.

Example:
@l $reason = $?="Where do you think you're going?"
Away $reason
AMe is away - $reason

Next in "IRC": Ban
Previous in "IRC": ASay
Next by name: Ban
Previous by name: Asc
Up to all commands by name or commands and functions by category


Ban command

Ban

Category: IRC

Syntax:
Ban [channel] nickname

Generates a mask for nickname using NickToMask, then sets a ban for that mask on channel. If channel is omitted, the current channel is used instead.

Example:
Ban #virc loser1234

See also: KB, Kick

Next in "IRC": ChannelControl
Previous in "IRC": Away
Next by name: Beep
Previous by name: Away
Up to all commands by name or commands and functions by category


Beep command

Beep

Category: Sounds

Syntax:
Beep

Plays the default Windows alert sound.

Example:
// drive the user insane
Timer 5 0 Beep

Next in "Sounds": DelEventSound
Previous in "Sounds": AddEventSound
Next by name: Bitmap
Previous by name: Ban
Up to all commands by name or commands and functions by category


CacheBitmap command

CacheBitmap

Category: Other

Syntax:
CacheBitmap name bitmaphandle

Stores a bitmap in ViRC's bitmap cache. bitmaphandle must be a handle returned by Bitmap.

By using the name of a built-in bitmap, such as _join.bmp, you can replace built-in images with your own.

Example:
Event <OnCacheBitmaps_myscript> "*"
  CacheBitmap _join.bmp $Bitmap($NoAttribs($GetPath(image)myscript_join.bmp))
EndEvent

See also: Bitmap, FlushBitmapCache

Next in "Other": CheckForUpdates
Previous in "Other": Bitmap
Next by name: Chain
Previous by name: Bitmap
Up to all commands by name or commands and functions by category


Chain command

Chain

Category: Objects
Category: Reflection

Syntax:
Chain command

Runs command in the context of the current routine. If command is an alias, it will have access to all the current routine's local variables. Any local variables changed by the alias will appear in the current routine once Chain returns.

This is useful for chaining OVS event handlers (hence the name). Event handlers receive their parameters in local variables, such as $Sender. However, you should use @E+ instead if you're setting multiple handlers for the same event.

Example:
// displays "x is now 10"
Alias ONE
  @l $x = 5
  Chain TWO
  MessageBox x is now $x
EndAlias

Alias TWO
  @l $x = $($x * 2)
EndAlias

Next in "Objects": ClassOf
Previous in "Objects": AddToSetProp
Next in "Reflection": EventExists
Previous in "Reflection": AliasList
Next by name: ChannelControl
Previous by name: CacheBitmap
Up to all commands by name or commands and functions by category


ChannelControl command

ChannelControl

Category: IRC

Syntax:
ChannelControl [channel]

Shows the channel control window for the specified channel. If channel is omitted, the current channel will be used.

The channel control window lets you edit the topic, mode, and bans. It can be mapped as !ChannelControl.

Example:
ChannelControl #virc

Next in "IRC": ChannelList
Previous in "IRC": Ban
Next by name: ChannelList
Previous by name: Chain
Up to all commands by name or commands and functions by category


ChDir command

ChDir

Category: Files

Syntax:
ChDir path

Changes the current directory to path. Many file-related commands and functions work relative to the current directory unless you give them full paths.

Example:
ChDir $getpath(script)

See also: GetCurrentDir, MkDir, RmDir

Next in "Files": CreateFile
Previous in "Files": AppendText
Next by name: CheckForUpdates
Previous by name: Char
Up to all commands by name or commands and functions by category


CheckForUpdates command

CheckForUpdates

Category: Other

Syntax:
CheckForUpdates

Contacts the ViRC web site to check for an updated version of the program. If the command is silenced with a ^, the message box will only appear if there is a new version.

Example:
// hide the "you are already running the latest version" message
^CheckForUpdates

Next in "Other": DNS
Previous in "Other": CacheBitmap
Next by name: ClassOf
Previous by name: ChDir
Up to all commands by name or commands and functions by category


Clear command

Clear

Category: Windows

Syntax:
Clear [-h] window

If -h is omitted, clears the output pane of window.

If -h is given, clears the input history of window.

Example:
// clear both the output and the input history
Clear $C
Clear -h $C

Next in "Windows": Close
Previous in "Windows": ActiveWindow
Next by name: Close
Previous by name: ClassOf
Up to all commands by name or commands and functions by category


Close command

Close

Category: Windows

Syntax:
Close windowname

Closes the specified child window.

Example:
// close all queries
foreach ($i; $QueryList())
  Close $i
endforeach

Next in "Windows": CurrentServer
Previous in "Windows": Clear
Next by name: Connect
Previous by name: Clear
Up to all commands by name or commands and functions by category


Connect command

Connect

Category: IRC

Syntax:
Connect

Connects to the server shown in the server selection toolbar, which is usually the last server you were connected to. This command has no effect if you are already connected.

Example:
Connect

Next in "IRC": CTCP
Previous in "IRC": ChannelList
Next by name: CreateFile
Previous by name: Close
Up to all commands by name or commands and functions by category


CreateFile command

CreateFile

Category: Files

Syntax:
CreateFile filename

Creates the specified file with zero length. If the file already exists, it will become empty.

Example:
@l $fn = $SaveDialog(Choose a file)
CreateFile $fn
AppendText $fn The new contents of the file.

Next in "Files": DirExists
Previous in "Files": ChDir
Next by name: CTCP
Previous by name: Connect
Up to all commands by name or commands and functions by category


CTCP command

CTCP

Category: IRC

Syntax:
CTCP target request [parameters]

Sends request to target with the Client-To-Client Protocol (CTCP). Commonly implemented CTCP requests are VERSION, PING, TIME, and CLIENTINFO.

CTCP requests are sent as private messages (PRIVMSG) surrounded by \A (ASCII 001). If the target chooses to respond to your request, you will receive the reply as a private notice (NOTICE) surrounded by \A.

It is customary (but not required) for clients to reply to unknown or malformed requests by sending an ERRMSG reply, with the first parameter containing the name of the incorrect request.

Example:
// request the time from a random person
@l $victim = $ListRand($NickList($C))
CTCP $victim TIME

See also: RCTCP

Next in "IRC": Cycle
Previous in "IRC": Connect
Next by name: CTime
Previous by name: CreateFile
Up to all commands by name or commands and functions by category


Cycle command

Cycle

Category: IRC

Syntax:
Cycle [channel]

Parts the specified channel without closing the channel window, then rejoins. If channel is omitted, the current channel will be used.

This is most useful when you're alone in a channel but you don't have ops.

Example:
Cycle #virc

See also: Join, Part

Next in "IRC": Desc
Previous in "IRC": CTCP
Next by name: Date
Previous by name: CurrentServer
Up to all commands by name or commands and functions by category


DCC command

DCC

Category: DCC

Syntax:
DCC Abort id
DCC Accept [id] filename
DCC Chat nickname
DCC Reject [id]
DCC Request type user@host [filename] ip port [totalsize] [reversetoken]
DCC Resume [id] offset filename
DCC Send nickname [filename]
DCC TSend nickname [filename]
DCC Whiteboard nickname

For DCC Abort, DCC Accept, DCC Reject, and DCC Resume, id must be a DCC entry ID returned by DCCList if specified. If id is omitted (except for DCC Abort), the command can only be used inside an <OnDCCRequest> event.

  • DCC Abort - Cancels a DCC connection.
  • DCC Accept - Accepts a DCC request that is waiting in the list, or request currently being processed if id is omitted. If filename is omitted, the file will be saved in your download path using the default filename.
  • DCC Chat - Sends a DCC Chat request to nickname.
  • DCC Reject - Cancels a DCC connection. If id is omitted, this cancels the request currently being processed; otherwise this is just like DCC Abort.
  • DCC Request - Adds a request to ViRC's DCC list. This should be called from a CTCP DCC event. type can be chat, wboard, send, or tsend. filename and totalsize should only be included when type is send or tsend; filename must be quoted. totalsize is required when type is tsend.
  • DCC Resume - Attempts to resume an incomplete file. offset is the number of bytes you have downloaded already. If filename is omitted, the file will be saved in your download path using the default filename. The sender's client must support DCC resume.
  • DCC Send - Sends a file to nickname. filename is relative to your upload path; if it is omitted, a dialog box will appear so you can choose a file.
  • DCC TSend - Just like DCC Send, but uses TDCC instead of DCC.
  • DCC Whiteboard - Sends a DCC Whiteboard request to nickname. If their client doesn't support whiteboard, it will appear as a DCC Chat request instead.
Example:
// chat a random person from the channel
DCC Chat $ListRand($NickList($C))

// auto-accept all DCC chats
Event <OnDCCRequest_acceptchat> "% CHAT"
  DCC Accept
EndEvent

Next in "DCC": DCCChatList
Next by name: DCCChatList
Previous by name: Date
Up to all commands by name or commands and functions by category


DelEventSound command

DelEventSound

Category: Sounds

Syntax:
DelEventSound name

Deletes an event sound that was previously added with AddEventSound.

Example:
AddEventSound myscript_page "My Script" "CTCP Page" default page.wav
...
DelEventSound myscript_page

See also: AddEventSound

Next in "Sounds": EventSoundList
Previous in "Sounds": Beep
Next by name: DelUserField
Previous by name: DecodeMInterval
Up to all commands by name or commands and functions by category


DelUserField command

DelUserField

Category: Userlist

Syntax:
DelUserField mask field

Deletes mask's entry for field in the user list. mask must exactly match the mask that was used to add the field.

Example:
SetUserField *!*foo@*.baz.com banlevel 5
...
DelUserField *!*foo@*.baz.com banlevel

Next in "Userlist": GetUserField
Next by name: Desc
Previous by name: DelEventSound
Up to all commands by name or commands and functions by category


Desc command

Desc

Category: IRC

Syntax:
Desc target text

Sends text to target as a private action. target can be a channel name, nickname, or the name of a DCC chat window.

This command doesn't display any text by itself. ViRC will call the <OnMyChanAction>, <OnMyPrivAction>, or <OnMyQueryAction> event to display it.

ViRC calls Desc window text when you type an action (/me) into a query or DCC chat window. You can write a /desc alias to intercept or change the text.

Example:
Desc Mr2001 secretly waves to you

// make sure all your query and DCC chat actions end with punctuation
Alias DESC
  @l $target = $1
  @l $text = $2-

  @l $lastchar = $SubStr($text $Length($text) 1)
  if [$lastchar] != [.] && [$lastchar] != [!] && [$lastchar] != [?]
    @l $text = ${text}.
  endif

  // call the built-in /desc to send the action
  *Desc $target $text
EndAlias

Next in "IRC": Disconnect
Previous in "IRC": Cycle
Next by name: Destroy
Previous by name: DelUserField
Up to all commands by name or commands and functions by category


Destroy command

Destroy

Category: Objects

Syntax:
Destroy object

Deletes an object and frees the memory it was using. If the object belongs to a user-defined class, its <Destroy> method will be called before it is destroyed.

You should always destroy objects created by your script after you're done using them. Don't destroy objects obtained with MapObject unless you know exactly what you're doing. To destroy an object from inside one of its event handlers, use SafeDestroy instead.

Example:
@l $ts = $new(TStringList)
$ts.LoadFromFile foo.txt
// process the file somehow
...
// we're done with the file, now destroy the object
Destroy $ts

See also: New, SafeDestroy

Next in "Objects": EventHandlers
Previous in "Objects": ClassOf
Next by name: DirExists
Previous by name: Desc
Up to all commands by name or commands and functions by category


Disconnect command

Disconnect

Category: IRC

Syntax:
Disconnect

Disconnects from the server. This command has no effect if you are not connected to a server.

Example:
if $IdleTime() > 3600
  Disconnect
endif

Next in "IRC": FlushIAL
Previous in "IRC": Desc
Next by name: DLL
Previous by name: DirExists
Up to all commands by name or commands and functions by category


Exit command

Exit

Category: Other

Syntax:
Exit

Closes ViRC immediately.

Example:
if [$?="Do you feel like quitting?"] == [yes]
  Exit
endif

Next in "Other": FlushBitmapCache
Previous in "Other": DNS
Next by name: FileExists
Previous by name: Exec
Up to all commands by name or commands and functions by category


FireEvent command

FireEvent

Category: Reflection

Syntax:
FireEvent name [parameters]

Runs the event called name, passing parameters in as $0-. name may contain wildcard characters (* and ?), in which case all matching events will be executed, in an undefined order.

Example:
FireEvent JOIN :Mr2001!mr2001@hansprestige.com JOIN #virc

Next in "Reflection": Name
Previous in "Reflection": EventMask
Next by name: FireMenuItem
Previous by name: FindWindow
Up to all commands by name or commands and functions by category


Me command

Me

Category: IRC

Syntax:
Me [channel] text

Sends text to channel as an action. If channel is omitted, the current channel will be used instead.

This command doesn't display any text by itself. ViRC will call the <OnMyChanAction> event to display it.

Channel actions are sent as CTCP ACTION, with text as the parameters.

Example:
Me #virc waves to everybody

Next in "IRC": Mode
Previous in "IRC": List
Next by name: MenuHint
Previous by name: MD5
Up to all commands by name or commands and functions by category


MenuHint command

MenuHint

Category: Menus

Syntax:
DESCRIBE SYNTAX

DESCRIPTION

Example:
SAMPLE CODE

Next in "Menus": MergeMenu
Previous in "Menus": GetMenuHint
Next by name: MergeMenu
Previous by name: Me
Up to all commands by name or commands and functions by category


MessageBox command

MessageBox

Category: Windows

Syntax:
MessageBox text

Displays text in a pop-up message box. Further script execution will block until the message box is dismissed by clicking OK.

Example:
MessageBox Your nick is $N and you are on $server.

See also: MessageDlg

Next in "Windows": MessageDlg
Previous in "Windows": Max
Next by name: MessageDlg
Previous by name: MergeMenu
Up to all commands by name or commands and functions by category


RCTCP command

RCTCP

Category: IRC

Syntax:
RCTCP target response [parameters]

Sends response to target with the Client-To-Client Protocol (CTCP). Use this to reply to a CTCP request you received from the target.

CTCP replies are sent as private notices (NOTICE) surrounded by \A (ASCII 001).

It is customary (but not required) for clients to reply to unknown or malformed requests by sending an ERRMSG reply, with the first parameter containing the name of the incorrect request. For example:

^RCTCP $nick ERRMSG PAGE :Sorry, my pager is turned off.
Example:
// send an additional version response
Event CTCPVersion_MyScript -after "% PRIVMSG % :\AVERSION"
  ^RCTCP $nick VERSION Running MyScript version 1.00! Download it today!
EndEvent

See also: CTCP

Next in "IRC": RemoveFromIAL
Previous in "IRC": Quote
Next by name: ReadLine
Previous by name: RandomRead
Up to all commands by name or commands and functions by category


Rehash command

Rehash

Category: Reflection

Syntax:
Rehash

Removes all aliases, events, menus, and toolbars from memory, then reloads the master script, add-on scripts, and personal script.

If you are an IRC Operator, you can rehash the IRC server with Raw REHASH password.

Example:
Rehash

Next in "Reflection": SetEventLine
Previous in "Reflection": Name
Next by name: RemoteNick
Previous by name: ReadLine
Up to all commands by name or commands and functions by category


RemoveFromIAL command

RemoveFromIAL

Category: IRC

Syntax:
RemoveFromIAL nick

Removed a nick's address from the internal address list (IAL).

Example:
// don't want GetAddress putting nicks in the IAL for you?
// override it with an alias...
Alias GETADDRESS
  // leading * calls the built-in function
  @l $address = $*GetAddress($1)
  RemoveFromIAL $1
  @ $fresult = $address
EndAlias

See also: IsInIAL, RemoveFromIAL

Next in "IRC": Say
Previous in "IRC": RCTCP
Next by name: RemoveFromSet
Previous by name: RemoteNick
Up to all commands by name or commands and functions by category


Syntax:
RemoveFromIAL nick

Removed a nick's address from the internal address list (IAL).

Example:
// don't want GetAddress putting nicks in the IAL for you?
// override it with an alias...
Alias GETADDRESS
  // leading * calls the built-in function
  @l $address = $*GetAddress($1)
  RemoveFromIAL $1
  @ $fresult = $address
EndAlias

See also: IsInIAL, RemoveFromIAL


RemoveFromSetProp command

RemoveFromSetProp

Category: Objects

Syntax:
RemoveFromSetProp object.property set

Removes elements from an object's set property. This is basically a shortcut for the following code:

@l $value = $prop(object.property) @p object.property = $RemoveFromSet($value set)
Example:
RemoveFromSetProp $form.BorderIcons [biMinimize,biMaximize]

Next in "Objects": SafeDestroy
Previous in "Objects": PropList
Next by name: Replace
Previous by name: RemoveFromSet
Up to all commands by name or commands and functions by category


RmDir command

RmDir

Category: Files

Syntax:
RmDir directory

Deletes the named directory. If the directory cannot be deleted, an EInOutError exception will be raised.

Example:
RmDir $GetPath()Temp

Try
  @l $dirname = $?="Enter a directory name to delete:"
  RmDir $dirname
  MessageBox Successfully deleted.
Except
  MessageBox Unable to delete! $ExceptMsg
EndTry

See also: MkDir, RmFile

Next in "Files": RmFile
Previous in "Files": ReadLine
Next by name: RmFile
Previous by name: Restore
Up to all commands by name or commands and functions by category


RmFile command

RmFile

Category: Files

Syntax:
RmFile filename

Deletes the named file. If the file cannot be deleted, an EInOutError exception will be raised.

Example:
RmFile $GetPath()temp.txt

Try
  @l $filename = $?="Enter a file name to delete:"
  RmFile $filename
  MessageBox Successfully deleted.
Except
  MessageBox Unable to delete! $ExceptMsg
EndTry

See also: CreateFile, RmDir

Previous in "Files": RmDir
Next by name: RStrPos
Previous by name: RmDir
Up to all commands by name or commands and functions by category


SafeDestroy command

SafeDestroy

Category: Objects

Syntax:
SafeDestroy object

Waits for all event handlers to finish running, then destroys the object. Use this instead of Destroy when you need to destroy an object from one of its event handlers, or an event handler belonging to one of its child controls.

Example:
@ $form = $new(TForm position 10,10,100,100)
@ $btn = $new(TButton ownedby $form position 5,5,80,20)
@p $btn.Caption = Kill the form
@e $btn.OnClick = SafeDestroy $form

See also: Destroy, New

Next in "Objects": UnmapObject
Previous in "Objects": RemoveFromSetProp
Next by name: SameNick
Previous by name: RStrTokREx
Up to all commands by name or commands and functions by category


Say command

Say

Category: IRC

Syntax:
Say [channel] text

Sends text to channel. If channel is omitted, the current channel will be used instead.

This command doesn't display any text by itself. ViRC will call the <OnMyChanText> event to display it.

ViRC calls Say #channel text when you type text into a channel window. You can write a /say alias to intercept or change the text.

Example:
Say #virc Hello there!

// automatically make everything you say bold
Alias SAY
  if $IsChannel($1)
    @l $chan = $1
    @l $msg = $2-
  else
    @l $chan = $C
    @l $msg = $1-
  endif

  // call the built-in /say to send the message
  *Say $chan \b$msg
EndAlias

Next in "IRC": Server
Previous in "IRC": RemoveFromIAL
Next by name: SelectNetwork
Previous by name: SavePictureDialog
Up to all commands by name or commands and functions by category


SetInputLine command

SetInputLine

Category: Windows

Syntax:
SetInputLine window text

Sets the contents of window's input line to text.

Example:
// hotkey to replace the input line with the contents of the clipboard
Alias PASTE_REPLACE Ctrl+Alt+V
  SetInputLine $C $GetClipboard()
EndAlias

See also: GetInputLine

Next in "Windows": Show
Previous in "Windows": ServerList
Next by name: SetNetData
Previous by name: SetEventSoundFile
Up to all commands by name or commands and functions by category


TextOut command

TextOut

Category: Windows

Syntax:
TextOut [> window] color text
TextOut > %object color text

Displays text in a server, channel, query, or DCC chat window, or in a text scroller object.

color can be a hex number ($$BBGGRR) or one of these values:

Standard colors | clBlack, clMaroon, clGreen, clOlive, clNavy, clPurple, clTeal, clGray, clSilver, clRed, clLime, clBlue, clFuchsia, clAqua, clWhite
User's color scheme | ecBackground, ecHyperlink, ecScriptLink, ecServText, ecMyChanText, ecChanText, ecMyQueryText, ecQueryText, ecAction, ecJOIN, ecPART, ecQUIT, ecPRIVMSG, ecNOTICE, ecTOPIC, ecMODE, ecKICK, ecCTCP, ecDCC, ecNICK, ecError, ecScript, ecInputBoxFG, ecInputBoxBG, ecNickListFG, ecNickListBG

If the first syntax is used, window can be a single window name, or a comma-separated list of window names to try in order. The first window name that exists will be used. If none of the named windows exist, but the last name refers to a query window, the query window will be opened automatically.

If the second syntax is used, object must be the valid handle of a TRichEdit or TMonkeySex object. TMonkeySex is read-only, but it's faster and works with more attribute codes than TRichEdit.

text may contain any of these control codes:

  • \b (bold) - makes all characters bold until the next \b
  • \d[RRGGBB][,RRGGBB] (RGB color) - makes all characters appear with the selected foreground and/or background color until the next \d; RRGGBB is a hex color like 80FF00 (orange)
  • \i (inverse/italics) - makes all characters inverse-color (in most clients) or italic (in older versions of ViRC) until the next \i; try to use \s or \r instead
  • \k[NUM][,NUM] (palette color) - makes all characters appear with the selected foreground and/or background color until the next \k; NUM can be 0=white, 1=black, 2=navy, 3=green, 4=red, 5=maroon, 6=purple, 7=orange, 8=yellow, 9=lime, 10=teal, 11=aqua, 12=blue, 13=fuchsia, 14=gray, 15=silver
  • \L
  • \o
  • \r
  • \s
  • \S
  • \t
  • \u
Example:
SAMPLE CODE

Next in "Windows": TextOutBitmap
Previous in "Windows": ShowServerList
Next by name: TextOutBitmap
Previous by name: TDCC
Up to all commands by name or commands and functions by category


Ver command

Ver

Category: IRC

Syntax:
Ver nick

Sends a CTCP VERSION request to nick. If nick is running a well-behaved client, you will receive a CTCP response with his client's version information.

This is equivalent to CTCP nick VERSION.

Example:
Ver Mr2001

See also: CTCP, RCTCP

Next in "IRC": VoiceList
Previous in "IRC": UMode
Next by name: VoiceList
Previous by name: UserFieldList
Up to all commands by name or commands and functions by category


ActiveServer function

ActiveServer

Category: Windows

Syntax:
$ActiveServer()

Returns the ID of the server that owns the currently activated child window, or 0 if there is no active child window (or if the active window is a DCC chat).

The value returned by ActiveServer is not necessarily the same server where it was called, unlike CurrentServer.

Example:
MessageBox The user is currently controlling server $ActiveServer().

See also: CurrentServer, OnServer, ServerList

Next in "Windows": ActiveWindow
Next by name: ActiveWindow
Previous by name: AbortEvents
Up to all functions by name or commands and functions by category


ActiveWindow function

ActiveWindow

Category: Windows

Syntax:
$ActiveWindow()

Returns the window name of the active child window.

Example:
if $IsChannel($ActiveWindow())
  MessageBox You're running this from a channel window.
endif

Next in "Windows": Clear
Previous in "Windows": ActiveServer
Next by name: AddEventSound
Previous by name: ActiveServer
Up to all functions by name or commands and functions by category


AddToSet function

AddToSet

Category: Sets

Syntax:
$AddToSet(set1 set2)

Combines two sets and returns a new set, which contains every element that was present in either set1 or set2, with no duplicates.

Example:
// displays [a,b,c]
MessageBox $AddToSet([a,b] [a,c])

if [$mode] == [+m]
  @ $ChanModes[$chan] = $AddToSet($ChanModes[$chan] moderated)
endif

Next in "Sets": IsInSet
Next by name: AddToSetProp
Previous by name: AddToIAL
Up to all functions by name or commands and functions by category


AliasExists function

AliasExists

Category: Reflection

Syntax:
$AliasExists(aliasname)

Returns true (1) if the named alias exists, or false (0) if there is no alias with that name.

Example:
if $AliasExists(J)
  UnAlias J
endif

Next in "Reflection": AliasList
Previous in "Reflection": AbortEvents
Next by name: AliasList
Previous by name: AddToSetProp
Up to all functions by name or commands and functions by category


AliasList function

AliasList

Category: Reflection

Syntax:
$AliasList()

Returns a list of all aliases currently loaded into memory.

Example:
// remove all aliases
foreach ($name; $AliasList())
  UnAlias $name
endforeach

See also: AliasExists, EventList

Next in "Reflection": Chain
Previous in "Reflection": AliasExists
Next by name: AMe
Previous by name: AliasExists
Up to all functions by name or commands and functions by category


ArrayKeys function

ArrayKeys

Category: Variables

Syntax:
$ArrayKeys($arrayvariable)

Returns a list of all keys defined in the array. The keys are not necessarily returned in any predictable order, but it will be the same order as ArrayValues until the array is changed.

Example:
ForEach ($key; $ArrayKeys($arrayvar))
  MessageBox The value for $key is $arrayvar[$key]
EndForEach

See also: ArrayValues

Next in "Variables": ArrayLength
Previous in "Variables": @S
Next by name: ArrayLength
Previous by name: AppendText
Up to all functions by name or commands and functions by category


ArrayLength function

ArrayLength

Category: Variables

Syntax:
$ArrayLength($arrayvariable)

Returns the number of values present in the array. For a proper array, this will be exactly half the value returned by ListElementCount, since the string representation of the array has two elements (key and value) for each value in the array.

Example:
@l $foo[bar] = one
@l $foo[baz] = two
@l $foo[bleck] = three
// displays "3"
MessageBox $ArrayLength($foo)

Next in "Variables": ArrayValues
Previous in "Variables": ArrayKeys
Next by name: ArrayValues
Previous by name: ArrayKeys
Up to all functions by name or commands and functions by category


ArrayValues function

ArrayValues

Category: Variables

Syntax:
$ArrayValues($arrayvariable)

Returns a list of all values in the array. The values are not necessarily returned in any predictable order, but it will be the same order as ArrayKeys until the array is changed.

Example:
ForEach ($value; $ArrayValues($arrayvar))
  If [$value] == [gold]
    MessageBox There's gold in that thar array!
  EndIf
EndForEach

See also: ArrayKeys

Previous in "Variables": ArrayLength
Next by name: ASay
Previous by name: ArrayLength
Up to all functions by name or commands and functions by category


Asc function

Asc

Category: Strings

Syntax:
$Asc(text)

Returns the ASCII value of the first character of text.

Example:
@l $ascii = $Asc($somechar)
if ($ascii >= 1) && ($ascii <= 26)
  MessageBox Control key: Ctrl+$Char($($Asc($thechar) + 64))
endif

See also: Char

Next in "Strings": Char
Next by name: Away
Previous by name: ASay
Up to all functions by name or commands and functions by category


Bitmap function

Bitmap

Category: Other

Syntax:
$Bitmap(filename)

Loads filename into memory and returns a unique handle. filename is relative to your image path. If the file has already been loaded, the same handle will be returned.

You can use the handle with TextOut or TextOutBitmap to display the bitmap with a line of text.

Example:
TextOutBitmap > $C ecJOIN $Bitmap(_join.bmp)

See also: CacheBitmap, FlushBitmapCache

Next in "Other": CacheBitmap
Next by name: CacheBitmap
Previous by name: Beep
Up to all functions by name or commands and functions by category


ChannelList function

ChannelList

Category: IRC

Syntax:
$ChannelList()

Returns a list of every open channel on the current server.

Example:
// give up ops on every channel
foreach ($i; $ChannelList())
  if $IsOp($N $i)
    Mode $i -o $N
  endif
endforeach

Next in "IRC": Connect
Previous in "IRC": ChannelControl
Next by name: Char
Previous by name: ChannelControl
Up to all functions by name or commands and functions by category


Char function

Char

Category: Strings

Syntax:
$Char(num)

Returns the character whose ASCII code is num. num must be between 0 and 255.

Example:
// display "A"
MessageBox $Char(65)

See also: Asc

Next in "Strings": Eval
Previous in "Strings": Asc
Next by name: ChDir
Previous by name: ChannelList
Up to all functions by name or commands and functions by category


ClassOf function

ClassOf

Category: Objects

Syntax:
$ClassOf(object)

Returns object's class name, or "TUnknown" if the object reference is invalid.

Example:
// reset all of an object's properties, by destroying and recreating it
@l $class = $ClassOf($object)
Destroy $object
@ $object = $New($class)

Next in "Objects": Destroy
Previous in "Objects": Chain
Next by name: Clear
Previous by name: CheckForUpdates
Up to all functions by name or commands and functions by category


CTime function

CTime

Category: Time and date

Syntax:
$CTime()

Returns the number of seconds that have elapsed since Windows started.

Example:
Say I am the master of the dramatic...

@l $waituntil = $($CTime() + 5)
while $CTime() < $waituntil
  Yield
endwhile

Say ... pause.

See also: MTime, UnixTime

Next in "Time and date": Date
Next by name: CurrentServer
Previous by name: CTCP
Up to all functions by name or commands and functions by category


CurrentServer function

CurrentServer

Category: Windows

Syntax:
$CurrentServer()

Returns the ID of the server where the function was called, or 0 if CurrentServer is called from the global interpreter. This is the same value returned by $GetWindowID(.).

Example:
MessageBox The name of this server is $ListIndex($ActiveServer() $ServerList())

See also: ActiveServer, OnServer, ServerList

Next in "Windows": GetInputLine
Previous in "Windows": Close
Next by name: Cycle
Previous by name: CTime
Up to all functions by name or commands and functions by category


Date function

Date

Category: Time and date

Syntax:
$Date()

Returns the current date in an appropriate format for your language settings.

Example:
MessageBox It is now $Time() on $Date().

Next in "Time and date": DecodeInterval
Previous in "Time and date": CTime
Next by name: DCC
Previous by name: Cycle
Up to all functions by name or commands and functions by category


DCCChatList function

DCCChatList

Category: DCC

Syntax:
$DCCChatList()

Returns a list of all open DCC chat windows.

Example:
foreach ($win; $DCCChatList())
  Msg $win Thanks for DCC chatting me, I am so lonely!
endforeach

See also: DCCList

Next in "DCC": DCCList
Previous in "DCC": DCC
Next by name: DCCList
Previous by name: DCC
Up to all functions by name or commands and functions by category


DCCList function

DCCList

Category: DCC

Syntax:
$DCCList()

Returns a list of all active DCC connections. Each element of the list is an asterisk followed by a unique number.

These DCC identifiers can be used by commands and functions such as DCC Abort and GetDCCInfo.

Example:
// get rid of all DCC list entries that have ended with an error
foreach ($id; $DCCList())
  if [$GetDCCInfo($id state)] == [error]
    DCC Abort $id
  endif
endforeach

Next in "DCC": DecodeIP
Previous in "DCC": DCCChatList
Next by name: DDE
Previous by name: DCCChatList
Up to all functions by name or commands and functions by category


DDE command/function

DDE

Category: Interprocess communication

Syntax:
// poking data:
DDE application topic item text

// executing a macro:
DDE application topic "" macro

// reading an item's value:
$DDE(application topic item)

// executing a macro and then reading an item's value:
$DDE(application topic item macro)

Performs a Dynamic Data Exchange (DDE) operation. The result of the operation, and the appropriate parameter values, depend on the application you're communicating with. application and topic must be single words; item must be quoted.

  • Poking data - Sets the value of a data field.
  • Executing a macro - Tells the application to run a command.
  • Reading an item's value - Retrieves the value of a data field.
  • Executing then reading - Combination of executing a macro and reading an item's value.
Example:
// tell ViRC to do something - double $ keeps it from being evaluated before DDE
DDE ViRC IRC_Execute "" Eval MessageBox My name is $$N.

// ask ViRC for the current time
@l $time = $DDE(ViRC DDE "IRC_ParseVars" $$time())
MessageBox ViRC says the time is $time.

Next in "Interprocess communication": DLL
Next by name: DecodeInterval
Previous by name: DCCList
Up to all commands by name, all functions by name or commands and functions by category


DecodeInterval function

DecodeInterval

Category: Time and date

Syntax:
$DecodeInterval(seconds [format])

Converts a number of seconds to a human-readable form, such as "3 days 1 hour 25 minutes 38 seconds". The optional format is a list of characters that determines which units are returned:

  • w - weeks
  • d - days
  • h - hours
  • m - minutes
  • s - seconds

Larger units must appear before smaller units. If no format is given, the default is dhms.

Example:
MessageBox Windows has been running for $DecodeInterval($CTime())
// displays "2 minutes 1 second"
MessageBox $DecodeInterval(121)
// displays "121 seconds"
MessageBox $DecodeInterval(121 s)
// displays "14 days 6 hours 56 minutes 7 seconds"
MessageBox $DecodeInterval(1234567)
// displays "2 weeks 6 hours 56 minutes"
MessageBox $DecodeInterval(1234567 whm)

See also: DecodeMInterval

Next in "Time and date": DecodeMInterval
Previous in "Time and date": Date
Next by name: DecodeIP
Previous by name: DDE
Up to all functions by name or commands and functions by category


DecodeIP function

DecodeIP

Category: DCC

Syntax:
$DecodeIP(encodedip)

Changes an encoded IP address back into a human-readable dotted IP address.

Example:
// displays 192.168.0.1
MessageBox $DecodeIP(3232235521)

See also: EncodeIP

Next in "DCC": EncodeIP
Previous in "DCC": DCCList
Next by name: DecodeMInterval
Previous by name: DecodeInterval
Up to all functions by name or commands and functions by category


DecodeMInterval function

DecodeMInterval

Category: Time and date

Syntax:
$DecodeMInterval(milliseconds [format])

Converts a number of milliseconds to a human-readable form, such as "3 days 1 hour 25 minutes 38.125 seconds". The optional format is a list of characters that determines which units are returned:

  • w - weeks
  • d - days
  • h - hours
  • m - minutes
  • s - seconds and fractional seconds

Larger units must appear before smaller units. If no format is given, the default is dhms.

Example:
MessageBox Windows has been running for $DecodeMInterval($MTime())
// displays "2 minutes 3.456 seconds"
MessageBox $DecodeInterval(123456)
// displays "123.456 seconds"
MessageBox $DecodeInterval(123456 s)
// displays "5 hours 11 minutes 15.309 seconds"
MessageBox $DecodeInterval(18675309)
// displays "5 hours 11 minutes"
MessageBox $DecodeInterval(18675309 hm)

See also: DecodeInterval

Next in "Time and date": MTime
Previous in "Time and date": DecodeInterval
Next by name: DelEventSound
Previous by name: DecodeIP
Up to all functions by name or commands and functions by category


DirExists function

DirExists

Category: Files

Syntax:
$DirExists(path)

Returns true (1) if path is the name of an existing directory, or false (0) if not.

Example:
if !$PathExists($GetPath()Logs)
  MkDir $GetPath()Logs
endif

See also: FileExists

Next in "Files": FileExists
Previous in "Files": CreateFile
Next by name: Disconnect
Previous by name: Destroy
Up to all functions by name or commands and functions by category


DNS command/function

DNS

Category: Other

Syntax:
DNS host
DNS nickname
$DNS(host)
$DNS(nickname)

Converts hostnames into IP addresses, and vice versa. If a nickname is given, its hostname will be looked up with GetAddress, and DNS will continue as if you supplied that hostname directly.

When called as a function, it returns an IP address (if a hostname was given), a hostname (if an IP address was given), or an empty string (if ViRC couldn't look up a nickname or contact the DNS server). When called as a command, DNS will display the information in the active window.

Example:
// get my hostname as it appears on the IRC server
@l $host = $StrTokR(@ $GetAddress($N))

// convert to an IP address if necessary
if !$IsIP($host)
  @l $host = $DNS($host)
endif

// display the result
if [$host] == []
  MessageBox Could not find your IP address.
else
  MessageBox Your IP address is $host.
endif

See also: GetAddress

Next in "Other": Exit
Previous in "Other": CheckForUpdates
Next by name: DockToolbar
Previous by name: DLL
Up to all commands by name, all functions by name or commands and functions by category


EncodeIP function

EncodeIP

Category: DCC

Syntax:
$EncodeIP(dottedip)

Changes a human-readable dotted IP address into an encoded address for DCC.

Example:
// displays 3232235521
MessageBox $DecodeIP(192.168.0.1)

See also: DecodeIP

Next in "DCC": GetDCCInfo
Previous in "DCC": DecodeIP
Next by name: Eval
Previous by name: DockToolbar
Up to all functions by name or commands and functions by category


Eval command/function

Eval

Category: Strings

Syntax:
Eval command
Eval statement
$Eval(text)

  • First syntax: Evaluates a command before running it.
  • Second syntax: Evaluates a statement before running it. For multi-line statements (such as If..EndIf), Eval can only be used on the first line (If).
  • Third syntax: Evaluates some text and returns the result.

Evaluating means replacing all dollar-sign and backslash substitutions, including variable references ($var), array references ($array[$key]), function calls ($func(params)), pseudofunction references ($?="message"), and attribute codes (\b). All commands in a script are evaluated once automatically, unless they begin with @ or -@. Object event handlers, timers, and commands typed into ViRC's input box are not normally evaluated.

Example:
@ $JoinFormat = *** $$nick has joined $$2
...
TextOut > $2 ecJoin $Eval($JoinFormat)

// display the time every 5 seconds
// the extra $ is necessary when this line is used in a script, otherwise
// ViRC will evaluate the call to $Time() when the timer is set.
Timer 5 Eval MessageBox $$Time()

// here's exactly what happens when you use Eval with a timer like that:
// 1. "Timer" line encountered in script.
// 2. "$$Time()" evaluates to "$Time()".
// 3. Timer created to run the command "Eval MessageBox $Time()"
// 4. Timer fires five seconds later, running the command.
// 5. "$Time()" evaluates to "12:34:56 PM" (for example).
// 6. ViRC runs the command "MessageBox 12:34:56 PM", displaying
//    a message box.
// 7. Wait 5 seconds and go to step 4.

Next in "Strings": GlobMatch
Previous in "Strings": Char
Next by name: EventExists
Previous by name: EncodeIP
Up to all commands by name, all functions by name or commands and functions by category


EventExists function

EventExists

Category: Reflection

Syntax:
$EventExists(eventname)

Returns true if an event called eventname has been created, or false if not.

Example:
// toggle an event on and off
if $EventExists(PRIVMSG_awaynotice)
  UnEvent PRIVMSG_awaynotice
else
  Event PRIVMSG_awaynotice -after "% PRIVMSG"
    // make sure the msg is directed only to me
    if $SameNick($2 $N)
      Notice $nick Sorry, I'm away right now. Try later.
    endif
  EndEvent
endif

See also: EventList, UnEvent

Next in "Reflection": EventList
Previous in "Reflection": Chain
Next by name: EventHandlers
Previous by name: Eval
Up to all functions by name or commands and functions by category


EventList function

EventList

Category: Reflection

Syntax:
$EventList()

Returns a list of the names of all events that have been set with the Event statement.

Example:
// remove all events
foreach ($i; $EventList())
  UnEvent $i
endforeach

See also: EventExists, UnEvent

Next in "Reflection": EventMask
Previous in "Reflection": EventExists
Next by name: EventMask
Previous by name: EventHandlers
Up to all functions by name or commands and functions by category


FileExists function

FileExists

Category: Files

Syntax:
$FileExists(filename)

Returns true (1) if the given file exists, or false (0) if not.

Example:
if $FileExists($getpath(script)smileys.vsc)
  Load $getpath(script)smileys.vsc
endif

See also: DirExists

Next in "Files": GetCurrentDir
Previous in "Files": DirExists
Next by name: FindWindow
Previous by name: Exit
Up to all functions by name or commands and functions by category


GetAddress function

GetAddress

Category: IRC

Syntax:
$GetAddress(nick)

Returns the user@host that nick is using to connect to IRC. If the server is not connected or the address can't be found, the function returns "unknown@unknown". If GetAddress is invoked from the global interpreter (e.g., from a main menu item), it returns "no@server".

This function works by sending a USERHOST request to the server and waiting for a response. GetAddress will not return until the server responds or a timeout is reached, but events and aliases may still run while the function is waiting (see Yield).

Example:
// ban someone by hostname
Alias HBAN
@l $address = $GetAddress($1)
if [$address] == [unknown@unknown]
  TextOut > $C ecError *** Can't find the address of $1
else
  @l $host = $StrTokR(@ $address)
  Mode $C +b *!*@$host
endif

See also: UhostToMask

Next in "IRC": GetKey
Previous in "IRC": FlushIAL
Next by name: GetClipboard
Previous by name: FreeMem
Up to all functions by name or commands and functions by category


GetClipboard function

GetClipboard

Category: Interprocess communication

Syntax:
$GetClipboard()

Returns the current contents of the Windows clipboard, or an empty string if the clipboard doesn't contain any text.

Example:
// paste from the clipboard into an edit box at the cursor
@p $edit.SelText = $GetClipboard()

See also: SetClipboard

Next in "Interprocess communication": GetMem
Previous in "Interprocess communication": FreeMem
Next by name: GetCurrentDir
Previous by name: GetAddress
Up to all functions by name or commands and functions by category


GetCurrentDir function

GetCurrentDir

Category: Files

Syntax:
$GetCurrentDir()

Returns the full path of the current directory.

Example:
// prompt the user to select a file from the upload path
@l $curdir = $GetCurrentDir()
ChDir $GetPath(upload)
@l $filename = $OpenDialog(Select a file)
// restore the previous directory
ChDir $curdir

Next in "Files": GetFileDateTime
Previous in "Files": FileExists
Next by name: GetDCCInfo
Previous by name: GetClipboard
Up to all functions by name or commands and functions by category


GetFileSize function

GetFileSize

Category: Files

Syntax:
$GetFileSize(filename)

Returns the size of the specified file in bytes, or an empty string if the files does not exist.

Example:
MessageBox $GetFileSize($GetPath(virc)ViRC.exe)

Next in "Files": GetLinesInFile
Previous in "Files": GetFileDateTime
Next by name: GetInputLine
Previous by name: GetFileDateTime
Up to all functions by name or commands and functions by category


GetInputLine function

GetInputLine

Category: Windows

Syntax:
$GetInputLine(window)

Returns the contents of window's input line, or an empty string if there is no such window.

Example:
// a hotkey to capitalize the input line
Alias CAPS_INPUT Ctrl+Shift+C
  SetInputLine $C $Upper($GetInputLine($C))
EndAlias

See also: SetInputLine

Next in "Windows": GetWindowID
Previous in "Windows": CurrentServer
Next by name: GetKey
Previous by name: GetFileSize
Up to all functions by name or commands and functions by category


GetMenuHint function

GetMenuHint

Category: Menus

Syntax:
$GetMenuHint(itemname on treename)

Returns the hint for the specified menu item, or an empty string if no hint is set.

Example:
MessageBox 'Whois' does this: $GetMenuHint(M_WHOIS on MT_CHANNELNICKSPOPUP)

See also: MenuHint

Next in "Menus": MenuHint
Previous in "Menus": FireMenuItem
Next by name: GetMode
Previous by name: GetMem
Up to all functions by name or commands and functions by category


GetPath function

GetPath

Category: Configuration

Syntax:
$GetPath(keyword)

Returns one of ViRC's default paths, including a trailing backslash. keyword can be any of these:

  • virc - the path where ViRC.exe is located
  • upload - the default path for sending files
  • download - the default path for receiving files
  • sound - the default location for sounds
  • image - the default location for bitmap images
  • log - the default location for log files
  • script - the default location for scripts

If keyword is omitted, it is assumed to be virc.

Example:
if $FileExists($GetPath(sound)happy.wav)
  PlaySoundFile happy.wav
endif

See also: GetCurrentDir

Next in "Configuration": GetSetting
Previous in "Configuration": AddScriptControl
Next by name: GetServSetting
Previous by name: GetNetSetting
Up to all functions by name or commands and functions by category


GetWindowID function

GetWindowID

Category: Windows

Syntax:
$GetWindowID(window)

Returns a number that distinguishes a window from other windows of the same type. Each server has a different ID, each channel on that server has a different ID, and so on.

The window ID for servers and DCC chats is visible in the window caption. Channel and query window captions display the ID of the server that owns them.

Example:
SAMPLE CODE

Next in "Windows": Hide
Previous in "Windows": GetInputLine
Next by name: GetWindowText
Previous by name: GetUserField
Up to all functions by name or commands and functions by category


IdleTime function

IdleTime

Category: IRC

Syntax:
$IdleTime()

Returns the number of seconds that have elapsed since you last sent a command to the server.

Example:
if $IdleTime() > 600
  Away (automatically set away after 10 minutes)
endif

See also: TimeConnected

Next in "IRC": IsHalfOp
Previous in "IRC": HalfOpList
Next by name: Inflate
Previous by name: HideToolbar
Up to all functions by name or commands and functions by category


IsA function

IsA

Category: Objects

Syntax:
$IsA(object class)

Returns true (1) if object is a member of class, or if class is one of its ancestor classes, or false (0) if not.

Example:
if $IsA($object TButton)
  @p $object.OnClick = MessageBox You clicked me!
endif

Next in "Objects": IsObject
Previous in "Objects": InternalCall
Next by name: IsChannel
Previous by name: IRCHyperlink
Up to all functions by name or commands and functions by category


IsChannel function

IsChannel

Category: Strings

Syntax:
$IsChannel(text)

Returns true (1) if text is a valid channel name beginning with #, +, or &, or false (0) if not.

Example:
Alias SAY
  // use the default channel if one isn't given to the alias
  if $IsChannel($1)
    @l $chan = $1
    @l $msg = $2-
  else
    @l $chan = $C
    @l $msg = $1-
  endif
  // make everything you say red
  *Say $chan \k4$msg
EndAlias

Next in "Strings": IsIP
Previous in "Strings": GlobMatchCaseEx
Next by name: IsDCCChatting
Previous by name: IsA
Up to all functions by name or commands and functions by category


IsInSet function

IsInSet

Category: Sets

Syntax:
$IsInSet(needle haystack)

Returns true if all the elements from the set needle are also present in the set haystack. Both sets should be surrounded by square brackets.

Example:
if $IsInSet([lctrl,rctrl] $ShiftKeys())
  MessageBox You are holding down both control keys.
endif

Next in "Sets": RemoveFromSet
Previous in "Sets": AddToSet
Next by name: IsIP
Previous by name: IsInIAL
Up to all functions by name or commands and functions by category


IsNumeric function

IsNumeric

Category: Strings

Syntax:
$IsNumeric(text)

Returns true (1) if text represents an integer, or false (0) if not.

Example:
// keep asking until the user enters a number
while 1
  @l $num = $?="Enter a number:"
  break if $IsNumeric($num)
endwhile

Next in "Strings": Length
Previous in "Strings": IsIP
Next by name: IsObject
Previous by name: IsLogging
Up to all functions by name or commands and functions by category


IsQuerying function

IsQuerying

Category: IRC
Category: Windows

Syntax:
$IsQuerying(nick)

Returns true (1) if you have a query window open for nick on the current server, or false (0) otherwise.

Example:
Event CTCPTrout "% PRIVMSG % :\ATROUT"
  if $IsQuerying($nick)
    TextOut > $nick ecCTCP *** $nick just sent you a CTCP Trout!
  else
    TextOut *** $nick just sent you a CTCP Trout!
  endif
  ^RCTCP $nick ERRMSG TROUT :Sorry, I don't eat trout.
EndEvent

Next in "IRC": IsVoice
Previous in "IRC": IsOp
Next in "Windows": IsWhiteboarding
Previous in "Windows": IsLogging
Next by name: IsVoice
Previous by name: IsOp
Up to all functions by name or commands and functions by category


Length function

Length

Category: Strings

Syntax:
$Length(text)

Returns the number of characters in text.

Example:
@l $newnick = $?="Enter a new nickname:"
if $Length($newnick) > $GetServSetting(nicklength)
  MessageBox Too long!
else
  Nick $newnick
endif

Next in "Strings": Lower
Previous in "Strings": IsNumeric
Next by name: List
Previous by name: Kill
Up to all functions by name or commands and functions by category


ListDelete function

ListDelete

Category: Lists

Syntax:
$ListDelete(num list)

Returns list with element number num deleted. Element numbers start at zero.

Example:
@l $names = Albert Betsy Chuck Dave
// displays "Albert Betsy Dave"
MessageBox $ListDelete(2 $names)

See also: ListInsert, ListRemove

Next in "Lists": ListElementCount
Previous in "Lists": ListClean
Next by name: ListElementCount
Previous by name: ListClean
Up to all functions by name or commands and functions by category


ListElementCount function

ListElementCount

Category: Lists

Syntax:
$ListElementCount(list)

Returns the number of elements in list.

Example:
@l $states = California Hawaii "New Mexico" Oregon
// displays 4
MessageBox $ListElementCount($states)

Next in "Lists": ListFromWords
Previous in "Lists": ListDelete
Next by name: ListFromWords
Previous by name: ListDelete
Up to all functions by name or commands and functions by category


ListIndex function

ListIndex

Category: Lists

Syntax:
$ListIndex(num list)

Returns element number num from list, or an empty string if list doesn't have that many elements. Element numbers start at zero.

Example:
@l $names = Albert Betsy Chuck Dave
// displays "Betsy"
MessageBox $ListIndex(1 $names)

See also: ListIndexOf, ListRand, ListRange

Next in "Lists": ListIndexOf
Previous in "Lists": ListFromWords
Next by name: ListIndexOf
Previous by name: ListFromWords
Up to all functions by name or commands and functions by category


ListRand function

ListRand

Category: Lists

Syntax:
$ListRand(list)

Returns a random element from list.

Example:
@l $victim = $ListRand($PeonList($C))
Kick $C $victim random peon kick!

See also: ListIndex, ListShuffle, Rand

Next in "Lists": ListRange
Previous in "Lists": ListQuote
Next by name: ListRange
Previous by name: ListQuote
Up to all functions by name or commands and functions by category


Lower function

Lower

Category: Strings

Syntax:
$Lower(text)

Returns text after converting it to lowercase.

Example:
// arrays are case-sensitive, but channel names aren't, so
// convert the key to lowercase before accessing the array
@l $lc = $Lower($C)
@ $opcount[$lc] = $ListElementCount($OpList($C))

See also: NickCase, Upper

Next in "Strings": MaskMatch
Previous in "Strings": Length
Next by name: MapObject
Previous by name: Log
Up to all functions by name or commands and functions by category


MessageDlg command/function

MessageDlg

Category: Windows

Syntax:
MessageDlg options prompt
$MessageDlg(options prompt)

Displays prompt in a message dialog box, with an icon and a choice of buttons. The icon and buttons are controlled by options, which is the sum of the appropriate numbers from this list:

  • Buttons shown:
    • OK = 0
    • OK, Cancel = 1
    • Abort, Retry, Ignore = 2
    • Yes, No, Cancel = 3
    • Yes, No = 4
    • Retry, Cancel = 5
  • Icon shown:
    • No icon = 0
    • STOP icon = 16
    • Question mark icon = 32
    • Exclamation point icon = 48
    • Information icon = 64
  • Default button:
    • First button is default = 0
    • Second button is default = 256
    • Third button is default = 512

If MessageDlg is called as a function, the return value depends on the button selected by the user:

  • OK = 1
  • Cancel = 2
  • Abort = 3
  • Retry = 4
  • Ignore = 5
  • Yes = 6
  • No = 7
Example:
// show Yes, No, Cancel with question icon
@l $x = $MessageDlg(35 Do you want to save your changes before quitting?)
switch $x
  case 6:
    // yes - save changes
  case 7:
    // no - discard changes
  case 2:
    // cancel - don't quit
endswitch

See also: MessageBox

Next in "Windows": Min
Previous in "Windows": MessageBox
Next by name: Min
Previous by name: MessageBox
Up to all commands by name, all functions by name or commands and functions by category


Syntax:
MessageDlg options prompt
$MessageDlg(options prompt)

Displays prompt in a message dialog box, with an icon and a choice of buttons. The icon and buttons are controlled by options, which is the sum of the appropriate numbers from this list:

  • Buttons shown:
    • OK = 0
    • OK, Cancel = 1
    • Abort, Retry, Ignore = 2
    • Yes, No, Cancel = 3
    • Yes, No = 4
    • Retry, Cancel = 5
  • Icon shown:
    • No icon = 0
    • STOP icon = 16
    • Question mark icon = 32
    • Exclamation point icon = 48
    • Information icon = 64
  • Default button:
    • First button is default = 0
    • Second button is default = 256
    • Third button is default = 512

If MessageDlg is called as a function, the return value depends on the button selected by the user:

  • OK = 1
  • Cancel = 2
  • Abort = 3
  • Retry = 4
  • Ignore = 5
  • Yes = 6
  • No = 7
Example:
// show Yes, No, Cancel with question icon
@l $x = $MessageDlg(35 Do you want to save your changes before quitting?)
switch $x
  case 6:
    // yes - save changes
  case 7:
    // no - discard changes
  case 2:
    // cancel - don't quit
endswitch

See also: MessageBox


MTime function

MTime

Category: Time and date

Syntax:
$MTime()

Returns the number of milliseconds that have elapsed since Windows started.

Example:
@l $start = $MTime()
for (@l $i = 1; $i <= 10000; $i++)
  @l $foo = i
endfor
MessageBox Setting a variable 10,000 times took $($MTime() - $start) ms.

See also: CTime, UnixTime

Next in "Time and date": Time
Previous in "Time and date": DecodeMInterval
Next by name: MTimer
Previous by name: Msg
Up to all functions by name or commands and functions by category


NewServerWindow command/function

NewServerWindow

Category: Windows

Syntax:
NewServerWindow [server]
$NewServerWindow([server])

Creates a new server window, ready to connect to server, or the default server if server is omitted.

If NewServerWindow is called as a function, it returns the new server's ID. You can use the ID with OnServer or other functions.

Example:
NewServerWindow

OnServer $NewServerWindow(irc.dal.net) Connect

Next in "Windows": NewWhiteboard
Previous in "Windows": NetworkID
Next by name: NewWhiteboard
Previous by name: New
Up to all commands by name, all functions by name or commands and functions by category


OnServer command/function

OnServer

Category: Windows

Syntax:
OnServer num command
$OnServer(num text)

Invokes another server's interpreter to run a command (first syntax) or evaluate some text (second syntax). num is the server window's ID, or 0 to use the global interpreter.

Example:
// a timer that won't go away when you close the server
OnServer 0 Timer 0 30 do_something_repetitive
// find your nick on another server
// double the $ to keep it from being evaluated before it gets to OnServer
MessageBox $OnServer(2 $$N)

See also: ActiveServer, CurrentServer, ServerList

Next in "Windows": OpenDialog
Previous in "Windows": OnAll
Next by name: OpenDialog
Previous by name: OnAll
Up to all commands by name, all functions by name or commands and functions by category


Rand function

Rand

Category: Other

Syntax:
$Rand(limit)

Returns a random integer between 0 and one less than limit. The limit must be positive.

$Rand(2) can be used for a random truth value, since it will either return 0 (false) or 1 (true).

Example:
// displays a number between 0 and 9
MessageBox $Rand(10)

See also: ListRand

Next in "Other": ShiftKeys
Previous in "Other": ParseColor
Next by name: RandomRead
Previous by name: Quote
Up to all functions by name or commands and functions by category


SameNick function

SameNick

Category: Strings

Syntax:
$SameNick(nick1 nick2)

Returns true (1) if nick1 and nick2 are the same, or false (0) if not. This is like a regular case-insensitive string comparison, except [\] are considered the same as {|}, respectively.

Example:
if $SameNick($nick $enemy)
  BK $C $nick Your brackets don't fool me!
endif

Next in "Strings": StripAttrs
Previous in "Strings": RStrTokREx
Next by name: SaveConfig
Previous by name: SafeDestroy
Up to all functions by name or commands and functions by category


ShiftKeys function

ShiftKeys

Category: Other

Syntax:
$ShiftKeys()

Returns a set of shift keys that are currently being held down. The set may contain any of these items:

  • shift - either Shift
  • lshift - left Shift
  • rshift - right Shift
  • ctrl - either Ctrl
  • lctrl - left Ctrl
  • rctrl - right Ctrl
  • alt - either Alt
  • lalt - left Alt
  • ralt - right Alt
  • start - either Windows key
  • lstart - left Windows key
  • rstart - right Windows key
  • context - the context menu key (next to right Ctrl on Windows keyboards)
Example:
if $IsInSet([lctrl] $ShiftKeys())
  MessageBox Thanks for holding down left Ctrl.
endif

Next in "Other": UpdateMainToolbar
Previous in "Other": Rand
Next by name: Show
Previous by name: SetWindowText
Up to all functions by name or commands and functions by category


StrTrim function

StrTrim

Category: Strings

Syntax:
$StrTrim(text)

Returns text after removing, in order:

  • any leading spaces
  • an optional leading colon (:)
  • any leading CTCP delimiters (ASCII 001, \A)
  • any trailing CTCP delimiters and spaces

Because StrTrim removes CTCP delimiters, be careful if you use it with SetEventLine. This sample event will change all notices into uppercase, but it will also change all CTCP responses into notices!

Event NOTICE_bad_example -before "% NOTICE *"
  SetEventLine $0 $1 $2 :$upper($StrTrim($3-))
EndEvent

In this example, the solution is to eliminate StrTrim:

Event NOTICE_good_example -before "% NOTICE *"
  SetEventLine $0 $1 $2 $upper($3-)
EndEvent
Example:
// displays "foo bar"
MessageBox $StrTrim(:foo bar)

// displays "  foo bar"
MessageBox $StrTrim(  :\A  foo bar  \A)

Next in "Strings": SubStr
Previous in "Strings": StrTokREx
Next by name: SubStr
Previous by name: StrTokREx
Up to all functions by name or commands and functions by category


TimeConnected function

TimeConnected

Category: IRC

Syntax:
$TimeConnected()

Returns the number of seconds you have been connected to the current server, or 0 if you are not connected.

Example:
if $TimeConnected() > 86400
  MessageBox Don't forget to sleep! :)
endif

See also: IdleTime

Next in "IRC": Topic
Previous in "IRC": SimulateServerData
Next by name: Timer
Previous by name: Time
Up to all functions by name or commands and functions by category


Upper function

Upper

Category: Strings

Syntax:
$Upper(text)

Returns text after converting it to uppercase.

Example:
Event NoShouting -after "% PRIVMSG #%"
  // don't kick if the text contains no letters...
  // i.e., if uppercase === lowercase
  if ([$3-] === [$Upper($3-)]) && ([$Upper($3-)] !== [$Lower($3-)])
    Kick $2 $nick No shouting please!
  endif
EndEvent

See also: Lower, NickCase

Next in "Strings": UrlDecode
Previous in "Strings": UpEval
Next by name: UrlDecode
Previous by name: UpEval
Up to all functions by name or commands and functions by category


WordCount function

WordCount

Category: Strings

Syntax:
$WordCount(text)

Returns the number of words in text.

Example:
@l $text = $?="Enter some words:"
MessageBox You entered $WordCount($text) words.

See also: ListElementCount

Previous in "Strings": WildMatchEx
Next by name: Yield
Previous by name: WindowedWho
Up to all functions by name or commands and functions by category